Skip to content

Commit 119a935

Browse files
committed
test: add setupVitest to tsconfig
Signed-off-by: JayFate <[email protected]>
1 parent 59e8284 commit 119a935

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

scripts/setupVitest.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,11 @@ expect.extend({
6565
}
6666
})
6767

68-
let warn
68+
const warn = vi.spyOn(console, 'warn')
6969
const asserted: Set<string> = new Set()
7070

7171
beforeEach(() => {
7272
asserted.clear()
73-
warn = vi.spyOn(console, 'warn')
7473
warn.mockImplementation(() => {})
7574
})
7675

tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"packages/runtime-dom/types/jsx.d.ts",
3434
"packages/*/__tests__",
3535
"packages/dts-test",
36-
"packages/vue/jsx-runtime"
36+
"packages/vue/jsx-runtime",
37+
"scripts/setupVitest.ts"
3738
]
3839
}

vitest.e2e.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-restricted-syntax */
12
import { UserConfig } from 'vitest/config'
23
import config from './vitest.config'
34

vitest.unit.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-restricted-syntax */
12
import { UserConfig, configDefaults } from 'vitest/config'
23
import config from './vitest.config'
34

0 commit comments

Comments
 (0)