Skip to content

Commit

Permalink
chore(test): migrate to vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieMason committed Dec 22, 2023
1 parent 3ae6c34 commit db0434b
Show file tree
Hide file tree
Showing 38 changed files with 3,176 additions and 5,454 deletions.
18 changes: 1 addition & 17 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'import', 'jest'],
plugins: ['@typescript-eslint', 'import'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
parserOptions: {
ecmaVersion: 6,
Expand All @@ -10,22 +10,6 @@ module.exports = {
es6: true,
node: true,
},
settings: {
jest: {
version: require('jest/package.json').version,
},
},
overrides: [
{
files: ['*.spec.ts'],
plugins: ['jest'],
extends: ['plugin:jest/recommended'],
rules: {
'jest/no-disabled-tests': 'error',
'jest/no-focused-tests': 'error',
},
},
],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-namespace': 'off',
Expand Down
2 changes: 1 addition & 1 deletion .syncpackrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const config = {
versionGroups: [
{
dependencies: ['@types/node'],
pinVersion: '14.18.36',
pinVersion: '18.19.3',
},
{
dependencies: ['chalk'],
Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"type": "node",
"request": "launch",
"name": "Debug tests for current .spec.ts file",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/jest",
"args": ["--runInBand", "--silent=false", "--verbose=false", "${relativeFile}"],
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/vitest",
"args": ["${relativeFile}"],
"internalConsoleOptions": "openOnSessionStart"
},
{
Expand Down
12 changes: 6 additions & 6 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"type": "shell"
},
{
"args": ["--silent", "false", "src", "test"],
"command": "${workspaceFolder}/node_modules/.bin/jest",
"args": ["run", "src", "test"],
"command": "${workspaceFolder}/node_modules/.bin/vitest",
"options": { "env": { "NODE_ENV": "test" } },
"group": "test",
"label": "Run tests",
Expand All @@ -27,8 +27,8 @@
"type": "shell"
},
{
"args": ["--silent", "false", "--watch", "--no-coverage", "--verbose=false", "src", "test"],
"command": "${workspaceFolder}/node_modules/.bin/jest",
"args": ["--no-coverage", "src", "test"],
"command": "${workspaceFolder}/node_modules/.bin/vitest",
"options": { "env": { "NODE_ENV": "test" } },
"group": "test",
"label": "Watch tests",
Expand All @@ -40,8 +40,8 @@
"type": "shell"
},
{
"args": ["--silent", "false", "--watch", "--verbose=false", "${relativeFile}"],
"command": "${workspaceFolder}/node_modules/.bin/jest",
"args": ["--no-coverage", "${relativeFile}"],
"command": "${workspaceFolder}/node_modules/.bin/vitest",
"options": { "env": { "NODE_ENV": "test" } },
"group": "test",
"label": "Watch tests for current .spec.ts file",
Expand Down
20 changes: 0 additions & 20 deletions jest.config.js

This file was deleted.

0 comments on commit db0434b

Please sign in to comment.