mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-23 19:47:07 +09:00
fix(ui): ignore code line anchors below 1, show JS errors in vite dev mode (#39432)
This commit is contained in:
1 parent
61e0343580
commit
590d2984d9
4 files changed
+18
No files matched your search
@@ -17,7 +17,11 @@ test('isGiteaError', () => {
|
||||
expect(isGiteaError('', `Error\n at chrome-extension://abc/content.js:1:1`)).toBe(false);
|
||||
expect(isGiteaError('', `Error\n at https://other-site.com/script.js:1:1`)).toBe(false);
|
||||
expect(isGiteaError('', `Error\n at ${origin}/assets/js/index.abc123.js:1:1`)).toBe(true);
|
||||
expect(isGiteaError('', `Error\n at ${origin}/web_src/js/index.ts:1:1`)).toBe(false);
|
||||
expect(isGiteaError(`${origin}/assets/js/index.js`, `Error\n at chrome-extension://abc/content.js:1:1`)).toBe(false);
|
||||
vi.spyOn(window.config, 'runModeIsProd', 'get').mockReturnValue(false);
|
||||
expect(isGiteaError('', `Error\n at ${origin}/web_src/js/index.ts:1:1`)).toBe(true);
|
||||
vi.restoreAllMocks();
|
||||
});
|
||||
|
||||
test('showGlobalErrorMessage', () => {
|
||||
|
||||
Reference in new issue
Block a user