Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/agents/engineer.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Modified files: [list from Step 2]
Run these checks:
1. `npm run build` (builds all packages in dependency order via tsc + esbuild)
2. `npm test` (runs Jest tests across all packages)
2. `npm test` (runs Vitest tests across all packages)
3. `npm run lint` (ESLint + Prettier check)
For single-package changes, you may scope:
Expand Down
2 changes: 1 addition & 1 deletion .claude/agents/pr-reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Run the full build and test suite:
# Build all packages (tsc + esbuild, respects dependency order)
npm run build

# Run all tests (Jest across all packages)
# Run all tests (Vitest across all packages)
npm test

# Lint check (ESLint + Prettier)
Expand Down
8 changes: 3 additions & 5 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
"name": "Exceptionless.JavaScript",
"image": "mcr.microsoft.com/vscode/devcontainers/typescript-node:latest",
"extensions": [
"andys8.jest-snippets",
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"firsttris.vscode-jest-runner",
"hbenl.vscode-test-explorer",
"juancasanova.awesometypescriptproblemmatcher",
"ryanluker.vscode-coverage-gutters",
"streetsidesoftware.code-spell-checker"
"streetsidesoftware.code-spell-checker",
"vitest.explorer"
],
"forwardPorts": [3000],
"postCreateCommand": "npm install"
"postCreateCommand": "npm ci"
}
6 changes: 2 additions & 4 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
{
"recommendations": [
"andys8.jest-snippets",
"davidanson.vscode-markdownlint",
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"firsttris.vscode-jest-runner",
"hbenl.vscode-test-explorer",
"juancasanova.awesometypescriptproblemmatcher",
"ryanluker.vscode-coverage-gutters",
"streetsidesoftware.code-spell-checker"
"streetsidesoftware.code-spell-checker",
"vitest.explorer"
]
}
12 changes: 6 additions & 6 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@
"name": "Test",
"request": "launch",
"type": "node",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": ["--runInBand"],
"program": "${workspaceFolder}/node_modules/.bin/vitest",
"args": ["--run"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
"program": "${workspaceFolder}/node_modules/vitest/vitest.mjs"
},
"cwd": "${workspaceRoot}"
},
{
"name": "Test Current File",
"request": "launch",
"type": "node",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": ["${fileBasenameNoExtension}"],
"program": "${workspaceFolder}/node_modules/.bin/vitest",
"args": ["--run", "${fileBasenameNoExtension}"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
"program": "${workspaceFolder}/node_modules/vitest/vitest.mjs"
},
"cwd": "${workspaceRoot}"
}
Expand Down
3 changes: 1 addition & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,5 @@
"webcompat"
],
"eslint.validate": ["javascript", "typescript"],
"deno.enable": false,
"jest.jestCommandLine": "npm test --"
"deno.enable": false
}
11 changes: 5 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,10 @@ Before marking work complete, verify:

### Framework

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

### Test Structure

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

```typescript
import { describe, test } from "@jest/globals";
import { expect } from "expect";
import { describe, test, expect } from "vitest";

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

Expand Down Expand Up @@ -330,7 +329,7 @@ npm test --workspace=packages/browser
npm run test:watch --workspace=packages/core

# Run tests matching a pattern
npx jest --testPathPattern="ExceptionlessClient"
npx vitest --run --testNamePattern="ExceptionlessClient"
```

### Test Principles (FIRST)
Expand Down
16 changes: 7 additions & 9 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import eslint from "@eslint/js";
import { defineConfig } from "eslint/config";
import eslintConfigPrettier from "eslint-config-prettier";
import jest from "eslint-plugin-jest";
import vitest from "@vitest/eslint-plugin";
import tseslint from "typescript-eslint";

export default defineConfig(
{
ignores: ["**/dist/", "**/node_modules/", ".agents/", "example/", "jest-resolver.cjs"]
},
{ ignores: ["**/dist/", "**/node_modules/", ".agents/", "example/"] },
eslint.configs.recommended,
{
extends: tseslint.configs.recommendedTypeChecked,
Expand Down Expand Up @@ -36,12 +34,12 @@ export default defineConfig(
eslintConfigPrettier,
{
files: ["**/test/**/*.ts"],
extends: [jest.configs["flat/recommended"]],
plugins: vitest.configs.recommended.plugins,
rules: {
"jest/valid-title": "off",
"jest/valid-describe-callback": "off",
"jest/no-export": "off",
"jest/no-done-callback": "warn"
...vitest.configs.recommended.rules,
"vitest/valid-title": "off",
"vitest/valid-describe-callback": "off",
"vitest/no-done-callback": "warn"
}
}
);
4 changes: 1 addition & 3 deletions example/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
"react-app"
]
},
"browserslist": {
Expand All @@ -26,7 +25,6 @@
]
},
"devDependencies": {
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
"@vitejs/plugin-react": "^6.0.1",
Expand Down
5 changes: 0 additions & 5 deletions example/react/src/setupTests.js

This file was deleted.

85 changes: 0 additions & 85 deletions jest-resolver.cjs

This file was deleted.

Loading
Loading