Skip to content

Commit 7f3ec96

Browse files
authored
test: move to vitest (#1105)
1 parent d6e2302 commit 7f3ec96

File tree

7 files changed

+2172
-1707
lines changed

7 files changed

+2172
-1707
lines changed

jest.config.json

-23
This file was deleted.

package.json

+9-8
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"start:storybook": "start-storybook -p 6006 --ci",
4040
"build:storybook": "del ./storybook-static; NODE_ENV=production build-storybook",
4141
"test:lint": "eslint \"src/**/*.{ts,tsx}\" \"stories/**/*.{ts,tsx}\" \"sandboxes/**/*.{ts,tsx}\" \"test/**/*.{ts,tsx}\"",
42-
"test:unit": "jest -c jest.config.json",
42+
"test:unit": "vitest run --coverage",
43+
"test:unit:watch": "vitest watch",
4344
"test:size": "size-limit",
4445
"test:typings": "tsd",
4546
"test": "pnpm test:lint && pnpm test:unit",
@@ -68,17 +69,17 @@
6869
"@storybook/react": "^6.3.12",
6970
"@swc/core": "^1.2.95",
7071
"@swc/helpers": "^0.4.0",
71-
"@swc/jest": "^0.2.4",
7272
"@testing-library/jest-dom": "^5.5.0",
7373
"@testing-library/react": "^13.0.0",
7474
"@types/faker": "^5.5.8",
75-
"@types/jest": "^27.0.2",
7675
"@types/node": "^18.0.0",
7776
"@types/react": "^18.0.0",
7877
"@types/react-dom": "^18.0.0",
7978
"@types/testing-library__jest-dom": "^5.14.5",
8079
"@typescript-eslint/eslint-plugin": "^5.0.0",
8180
"@typescript-eslint/parser": "^5.0.0",
81+
"@vitejs/plugin-react": "^2.2.0",
82+
"@vitest/coverage-c8": "^0.25.2",
8283
"browserslist": "^4.17.3",
8384
"chart.js": "^3.1.0",
8485
"chartjs-adapter-date-fns": "^2.0.0",
@@ -98,9 +99,7 @@
9899
"eslint-plugin-promise": "^5.1.0",
99100
"eslint-plugin-react": "^7.17.0",
100101
"faker": "^5.5.3",
101-
"inquirer": "^9.0.0",
102-
"jest": "^27.2.5",
103-
"jest-canvas-mock": "^2.2.0",
102+
"jsdom": "^20.0.2",
104103
"nano-staged": "^0.8.0",
105104
"prettier": "^2.0.4",
106105
"react": "^18.0.0",
@@ -114,6 +113,9 @@
114113
"standard-version": "^9.3.1",
115114
"tsd": "^0.24.0",
116115
"typescript": "^4.4.3",
116+
"vite": "^3.2.4",
117+
"vitest": "^0.25.2",
118+
"vitest-canvas-mock": "^0.2.1",
117119
"webpack": "^5.58.2"
118120
},
119121
"tsd": {
@@ -125,6 +127,5 @@
125127
]
126128
}
127129
}
128-
},
129-
"readme": ""
130+
}
130131
}

0 commit comments

Comments
 (0)