Skip to content

Commit

Permalink
test: fix some types in test/browser (#7178)
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa authored Jan 7, 2025
1 parent b628464 commit 1059850
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions test/browser/fixtures/mocking/import-actual-in-mock.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ vi.mock(import('./src/mocks_factory'), async (importOriginal) => {
const original = await importOriginal()
return {
...original,
mocked: 'mocked!',
mocked: true,
}
})

test('actual is overriding import', () => {
expect(mocked).toBe('mocked!')
expect(mocked).toBe(true)
expect(calculator('plus', 1, 2)).toBe(3)
})
8 changes: 5 additions & 3 deletions test/browser/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"target": "ESNext",
"jsx": "react-jsx",
"module": "ESNext",
"moduleResolution": "Bundler",
Expand All @@ -12,12 +13,13 @@
"vitest-browser-react",
"vitest/import-meta"
],
"noEmit": true,
"esModuleInterop": true
},
"include": [
"fixtures/**/*.ts",
"test/**/*.ts",
"specs/**/*.ts",
"fixtures",
"test",
"specs",
"./vitest.config.*",
"./setup.unit.ts"
]
Expand Down

0 comments on commit 1059850

Please sign in to comment.