Skip to content

Commit add96a9

Browse files
committed
Clean up repo tooling for Vitest
Update repo instructions, editor recommendations, and devcontainer defaults so local tooling points at Vitest instead of the removed Jest workflow.
1 parent 0ad376f commit add96a9

File tree

7 files changed

+19
-25
lines changed

7 files changed

+19
-25
lines changed

.claude/agents/engineer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Modified files: [list from Step 2]
146146
Run these checks:
147147
148148
1. `npm run build` (builds all packages in dependency order via tsc + esbuild)
149-
2. `npm test` (runs Jest tests across all packages)
149+
2. `npm test` (runs Vitest tests across all packages)
150150
3. `npm run lint` (ESLint + Prettier check)
151151
152152
For single-package changes, you may scope:

.claude/agents/pr-reviewer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Run the full build and test suite:
6767
# Build all packages (tsc + esbuild, respects dependency order)
6868
npm run build
6969

70-
# Run all tests (Jest across all packages)
70+
# Run all tests (Vitest across all packages)
7171
npm test
7272

7373
# Lint check (ESLint + Prettier)

.devcontainer/devcontainer.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22
"name": "Exceptionless.JavaScript",
33
"image": "mcr.microsoft.com/vscode/devcontainers/typescript-node:latest",
44
"extensions": [
5-
"andys8.jest-snippets",
65
"dbaeumer.vscode-eslint",
76
"editorconfig.editorconfig",
87
"esbenp.prettier-vscode",
9-
"firsttris.vscode-jest-runner",
10-
"hbenl.vscode-test-explorer",
118
"juancasanova.awesometypescriptproblemmatcher",
129
"ryanluker.vscode-coverage-gutters",
13-
"streetsidesoftware.code-spell-checker"
10+
"streetsidesoftware.code-spell-checker",
11+
"vitest.explorer"
1412
],
1513
"forwardPorts": [3000],
16-
"postCreateCommand": "npm install"
14+
"postCreateCommand": "npm ci"
1715
}

.vscode/extensions.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
{
22
"recommendations": [
3-
"andys8.jest-snippets",
43
"davidanson.vscode-markdownlint",
54
"dbaeumer.vscode-eslint",
65
"editorconfig.editorconfig",
76
"esbenp.prettier-vscode",
8-
"firsttris.vscode-jest-runner",
9-
"hbenl.vscode-test-explorer",
107
"juancasanova.awesometypescriptproblemmatcher",
118
"ryanluker.vscode-coverage-gutters",
12-
"streetsidesoftware.code-spell-checker"
9+
"streetsidesoftware.code-spell-checker",
10+
"vitest.explorer"
1311
]
1412
}

.vscode/launch.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,27 @@
1414
"name": "Test",
1515
"request": "launch",
1616
"type": "node",
17-
"program": "${workspaceFolder}/node_modules/.bin/jest",
18-
"args": ["--runInBand"],
17+
"program": "${workspaceFolder}/node_modules/.bin/vitest",
18+
"args": ["--run"],
1919
"console": "integratedTerminal",
2020
"internalConsoleOptions": "neverOpen",
2121
"disableOptimisticBPs": true,
2222
"windows": {
23-
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
23+
"program": "${workspaceFolder}/node_modules/vitest/vitest.mjs"
2424
},
2525
"cwd": "${workspaceRoot}"
2626
},
2727
{
2828
"name": "Test Current File",
2929
"request": "launch",
3030
"type": "node",
31-
"program": "${workspaceFolder}/node_modules/.bin/jest",
32-
"args": ["${fileBasenameNoExtension}"],
31+
"program": "${workspaceFolder}/node_modules/.bin/vitest",
32+
"args": ["--run", "${fileBasenameNoExtension}"],
3333
"console": "integratedTerminal",
3434
"internalConsoleOptions": "neverOpen",
3535
"disableOptimisticBPs": true,
3636
"windows": {
37-
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
37+
"program": "${workspaceFolder}/node_modules/vitest/vitest.mjs"
3838
},
3939
"cwd": "${workspaceRoot}"
4040
}

.vscode/settings.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,5 @@
3636
"webcompat"
3737
],
3838
"eslint.validate": ["javascript", "typescript"],
39-
"deno.enable": false,
40-
"jest.jestCommandLine": "npm test --"
39+
"deno.enable": false
4140
}

AGENTS.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,10 @@ Before marking work complete, verify:
262262

263263
### Framework
264264

265-
- **Jest** with **ts-jest** preset
266-
- **`@jest/globals`** for imports (`describe`, `test`, `expect`)
265+
- **Vitest** as the test runner
266+
- **`vitest`** for imports (`describe`, `test`, `expect`, `beforeEach`, `afterEach`)
267267
- **jsdom** test environment for browser packages, **node** for the node package
268-
- **jest-ts-webcompat-resolver** for ESM import resolution
268+
- **vitest.config.ts** at root defines test projects for each package
269269

270270
### Test Structure
271271

@@ -288,8 +288,7 @@ packages/core/test/
288288
Follow the Arrange-Act-Assert pattern:
289289

290290
```typescript
291-
import { describe, test } from "@jest/globals";
292-
import { expect } from "expect";
291+
import { describe, test, expect } from "vitest";
293292

294293
import { ExceptionlessClient } from "../src/ExceptionlessClient.js";
295294

@@ -330,7 +329,7 @@ npm test --workspace=packages/browser
330329
npm run test:watch --workspace=packages/core
331330

332331
# Run tests matching a pattern
333-
npx jest --testPathPattern="ExceptionlessClient"
332+
npx vitest --run --testNamePattern="ExceptionlessClient"
334333
```
335334

336335
### Test Principles (FIRST)

0 commit comments

Comments
 (0)