Skip to content

Commit 9b74df4

Browse files
jaggederestclaude
andcommitted
fix: configure Vitest to properly exclude VS Code integration tests
- Add vitest.config.ts with proper include/exclude patterns - Exclude src/test/** directory from unit tests (VS Code integration tests) - Exclude compiled out/** directory from test discovery - Update tsconfig.json to exclude vitest.config.ts from compilation - Add .eslintignore to skip linting vitest config - Update test script to use default Vitest behavior - Fix .vscodeignore formatting (add missing newline) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 8ddbf26 commit 9b74df4

File tree

5 files changed

+22
-3
lines changed

5 files changed

+22
-3
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vitest.config.ts

.vscodeignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ node_modules/**
1212
**/.editorconfig
1313
**/*.map
1414
**/*.ts
15-
*.gif
15+
*.gif

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@
278278
"package:prerelease": "npx vsce package --pre-release",
279279
"lint": "eslint . --ext ts,md",
280280
"lint:fix": "yarn lint --fix",
281-
"test": "vitest ./src",
281+
"test": "vitest",
282282
"test:ci": "CI=true yarn test",
283283
"test:integration": "vscode-test",
284284
"pretest": "yarn run compile-tests && yarn run build && yarn run lint",

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
"sourceMap": true,
99
"strict": true,
1010
"skipLibCheck": true
11-
}
11+
},
12+
"exclude": ["vitest.config.ts"]
1213
}

vitest.config.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { defineConfig } from "vitest/config";
2+
3+
export default defineConfig({
4+
test: {
5+
include: ["src/**/*.test.ts"],
6+
exclude: [
7+
"**/node_modules/**",
8+
"**/dist/**",
9+
"**/build/**",
10+
"**/out/**",
11+
"**/src/test/**",
12+
"src/test/**",
13+
"./src/test/**",
14+
],
15+
environment: "node",
16+
},
17+
});

0 commit comments

Comments
 (0)