Skip to content

Commit ca1f764

Browse files
committed
fix unit-tests
1 parent 126392f commit ca1f764

File tree

13 files changed

+39
-20
lines changed

13 files changed

+39
-20
lines changed

examples/eslint/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"type": "commonjs",
88
"files": [],
99
"scripts": {
10-
"clean": "rimraf $INIT_CWD/dist/ $INIT_CWD/coverage/ $INIT_CWD/temp/",
10+
"clean": "rimraf $INIT_CWD/dist/ $INIT_CWD/coverage/ $INIT_CWD/temp/ $INIT_CWD/tsconfig.vitest-temp.json",
1111
"format-check": "yarn run -T format-check",
1212
"format": "yarn run -T format",
1313
"lint-fix": "yarn run -T lint-fix",

examples/eslint/vitest.config.mts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,18 @@ const vitestConfig = createVitestProject({
1919

2020
dir: path.join(import.meta.dirname, 'tests'),
2121
globalSetup: ['./vitest.global.setup.mts'],
22-
isolate: false,
2322
name: packageJson.name,
2423
root: import.meta.dirname,
2524

26-
sequence: {
27-
concurrent: true,
28-
},
29-
3025
server: {
3126
deps: {
3227
external: [eslintConfigPackageJson.name, 'eslint', 'jiti'],
3328
},
3429
},
3530

36-
testTimeout: process.env.CI ? 60_000 : 10_000,
31+
typecheck: {
32+
tsconfig: path.join(import.meta.dirname, 'tsconfig.json'),
33+
},
3734
},
3835
})
3936

examples/prettier/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"type": "commonjs",
88
"files": [],
99
"scripts": {
10-
"clean": "rimraf $INIT_CWD/dist/ $INIT_CWD/coverage/ $INIT_CWD/temp/",
10+
"clean": "rimraf $INIT_CWD/dist/ $INIT_CWD/coverage/ $INIT_CWD/temp/ $INIT_CWD/tsconfig.vitest-temp.json",
1111
"format-check": "yarn run -T format-check",
1212
"format": "yarn run -T format",
1313
"lint-fix": "yarn run -T lint-fix",

examples/prettier/vitest.config.mts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,18 @@ const vitestConfig = createVitestProject({
1919

2020
dir: path.join(import.meta.dirname, 'tests'),
2121
globalSetup: ['./vitest.global.setup.mts'],
22-
isolate: false,
2322
name: packageJson.name,
2423
root: import.meta.dirname,
2524

26-
sequence: {
27-
concurrent: true,
28-
},
29-
3025
server: {
3126
deps: {
3227
external: [prettierConfigPackageJson.name, 'prettier'],
3328
},
3429
},
30+
31+
typecheck: {
32+
tsconfig: path.join(import.meta.dirname, 'tsconfig.json'),
33+
},
3534
},
3635
})
3736

examples/typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"type": "commonjs",
88
"files": [],
99
"scripts": {
10-
"clean": "rimraf $INIT_CWD/dist/ $INIT_CWD/coverage/ $INIT_CWD/temp/",
10+
"clean": "rimraf $INIT_CWD/dist/ $INIT_CWD/coverage/ $INIT_CWD/temp/ $INIT_CWD/tsconfig.vitest-temp.json",
1111
"format-check": "yarn run -T format-check",
1212
"format": "yarn run -T format",
1313
"lint-fix": "yarn run -T lint-fix",

examples/typescript/vitest.config.mts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,18 @@ const vitestConfig = createVitestProject({
1919

2020
dir: path.join(import.meta.dirname, 'tests'),
2121
globalSetup: ['./vitest.global.setup.mts'],
22-
isolate: false,
2322
name: packageJson.name,
2423
root: import.meta.dirname,
2524

26-
sequence: {
27-
concurrent: true,
28-
},
29-
3025
server: {
3126
deps: {
3227
external: [tsConfigPackageJson.name, 'typescript'],
3328
},
3429
},
30+
31+
typecheck: {
32+
tsconfig: path.join(import.meta.dirname, 'tsconfig.json'),
33+
},
3534
},
3635
})
3736

examples/vitest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"type": "commonjs",
88
"files": [],
99
"scripts": {
10-
"clean": "rimraf $INIT_CWD/dist/ $INIT_CWD/coverage/ $INIT_CWD/temp/",
10+
"clean": "rimraf $INIT_CWD/dist/ $INIT_CWD/coverage/ $INIT_CWD/temp/ $INIT_CWD/tsconfig.vitest-temp.json",
1111
"format-check": "yarn run -T format-check",
1212
"format": "yarn run -T format",
1313
"lint-fix": "yarn run -T lint-fix",

examples/vitest/vitest.config.cjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ const vitestConfig = createVitestProject({
1010
environment: 'jsdom',
1111
name: `${packageJson.name}-${path.extname(__filename).replace('.', '')}`,
1212
root: __dirname,
13+
14+
typecheck: {
15+
tsconfig: path.join(__dirname, 'tsconfig.json'),
16+
},
1317
// Other additional overrides
1418
},
1519
})

examples/vitest/vitest.config.cts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ const vitestConfig = createVitestProject({
1111
environment: 'jsdom',
1212
name: `${packageJson.name}-${path.extname(__filename).replace('.', '')}`,
1313
root: __dirname,
14+
15+
typecheck: {
16+
tsconfig: path.join(__dirname, 'tsconfig.json'),
17+
},
1418
// Other additional overrides
1519
},
1620
})

examples/vitest/vitest.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ module.exports = (async () => {
1515
environment: 'jsdom',
1616
name: `${packageJson.name}-${path.extname(__filename).replace('.', '')}`,
1717
root: __dirname,
18+
19+
typecheck: {
20+
tsconfig: path.join(__dirname, 'tsconfig.json'),
21+
},
1822
// Other additional overrides
1923
},
2024
})

0 commit comments

Comments
 (0)