sourcegraph/client/template-parser/package.json
Quinn Slack ae5325e432
switch from jest to vitest for faster, simpler tests (#57886)
Replaces our usage of jest with vitest. Also removes the babel transpiler. This simplifies our test configuration by a lot, makes tests run 10% faster, and makes further modernizations to our build/test stuff possible (such as using vite for frontend builds).

This removes some of the junit exporting for Buildkite, and the vitest bazel defs don't really cleanly implement bazel testing guidelines (like sharding). But vitest is only used for unit tests (all integration/e2e/regression tests have always run in mocha), so none of them are very slow anyway.

## Codemods for vitest imports

fastmod -e js,ts,tsx @jest/globals vitest client/ dev/release/
fastmod -e js,ts,tsx 'jest\.(\w+)\(' 'vi.$1(' client/ dev/release/
fastmod -e js,ts,tsx 'jest,' 'vi,' client/ dev/release/
fastmod -e js,ts,tsx 'jest }' 'vi }' client/ dev/release/
git diff --diff-filter=M --name-only | xargs pnpm exec prettier --write
2023-11-05 21:57:04 -10:00

14 lines
308 B
JSON

{
"private": true,
"name": "@sourcegraph/template-parser",
"version": "0.0.1",
"description": "Sourcegraph Template Parser",
"main": "./src/index.ts",
"sideEffects": false,
"license": "Apache-2.0",
"scripts": {
"lint:js": "eslint --cache 'src/**/*.[jt]s?(x)'",
"test": "vitest"
}
}