Skip to content

Commit 043be61

Browse files
committed
✅ [core/vitest] support in-source test
1 parent 7329d7d commit 043be61

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

core/tsconfig.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"extends": "../tsconfig.json",
33
"compilerOptions": {
4-
"typeRoots": [],
5-
"baseUrl": "./lib",
4+
/*"typeRoots": [],*/
5+
"baseUrl": ".",
66
"jsx": "preserve",
7-
"jsxImportSource": "vue"
7+
"jsxImportSource": "vue",
88
}
99
}

core/vitest.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import Jsx from '@vitejs/plugin-vue-jsx';
1414
export default defineConfig({
1515
plugins: [Vue(), Jsx()],
1616
test: {
17+
includeSource: ['components/**', 'compositions/**'],
1718
environment: 'happy-dom',
1819
clearMocks: true,
1920
coverage: {

tsconfig.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
"allowJs": true,
1010
"experimentalDecorators": true,
1111
"useDefineForClassFields": false,
12+
"noEmit": true,
13+
"types":[
14+
"vitest/importMeta"
15+
],
1216
"allowImportingTsExtensions": true,
1317
}
1418
}

0 commit comments

Comments
 (0)