Skip to content

Commit 9247e3f

Browse files
authored
Migrate to Vitest (#1387)
* Use vitest instead of jest * Adjust lint rules * Migrate assertion approach
1 parent 051915b commit 9247e3f

11 files changed

Lines changed: 767 additions & 3608 deletions

.eslintrc.json

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,17 @@
1212
"BigInt64Array": "readonly",
1313
"BigUInt64Array": "readonly"
1414
},
15-
"env": {
16-
"jest/globals": true
17-
},
18-
19-
"plugins": [ "jest", "react", "react-hooks" ],
15+
"plugins": [ "react", "react-hooks", "@vitest/eslint-plugin" ],
2016
"extends": [
2117
"eslint:recommended",
22-
"plugin:jest/recommended",
2318
"plugin:react/recommended",
2419
"plugin:react-hooks/recommended",
25-
"./node_modules/eslint-config-mdcs/index.js"
20+
"./node_modules/eslint-config-mdcs/index.js",
21+
"plugin:@vitest/legacy-recommended"
2622
],
27-
23+
"env": {
24+
"@vitest/env": true
25+
},
2826
"settings": {
2927
"react": {
3028
"version": "detect"
@@ -47,7 +45,14 @@
4745
"ignoreMemberSort": true,
4846
"memberSyntaxSortOrder": [ "none", "all", "multiple", "single" ],
4947
"allowSeparatedGroups": false
50-
} ]
48+
} ],
49+
50+
"@vitest/no-disabled-tests": "warn",
51+
"@vitest/no-focused-tests": "error",
52+
"@vitest/no-identical-title": "error",
53+
"@vitest/prefer-to-have-length": "warn",
54+
"@vitest/valid-expect": "error",
55+
"@vitest/valid-describe-callback": 0
5156
},
5257
"overrides": [ {
5358
"files": [ "*.ts" ],

jest.config.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)