Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/components/BridgeForm.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ describe('BridgeForm network mismatch guardrails', () => {
hasAnyMismatch: true,
};

const alertSpy = vi.spyOn(window, 'alert').mockImplementation(() => {});
vi.spyOn(window, 'alert').mockImplementation(() => {});

render(
<BridgeForm
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/test/setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '@testing-library/jest-dom'
import '@testing-library/jest-dom/vitest'
11 changes: 11 additions & 0 deletions frontend/src/types/vitest.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { TestingLibraryMatchers } from '@testing-library/jest-dom/matchers';

declare module 'vitest' {
interface Assertion<T = any> extends TestingLibraryMatchers<any, T> {}
interface AsymmetricMatchersContaining extends TestingLibraryMatchers<any, any> {}
}

declare module '@vitest/expect' {
interface Assertion<T = any> extends TestingLibraryMatchers<any, T> {}
interface AsymmetricMatchersContaining extends TestingLibraryMatchers<any, any> {}
}
3 changes: 2 additions & 1 deletion frontend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
},
"types": ["vitest/globals"]
},
"include": ["src", "src/types/**/*"],
"exclude": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/test"]
Expand Down
Loading