Skip to content

Commit c309807

Browse files
silverwind6543wxiaoguang
authored
Switch from jest to vitest (#21444)
Even if we are not bundling with `vite` yet, we can use `vitest` in place of Jest which brings a few benefits like not requiring to use `NODE_OPTIONS` to run and having sane module resolution. It's possible to also use `jest-extended` with vitest, but I opted to not do so for now because it brings heavyweight dependencies and it was trivial to just rewrite the affected matchers to be compatible. This PR also removes 153 JS dependencies, which is certainly nice. Co-authored-by: 6543 <[email protected]> Co-authored-by: wxiaoguang <[email protected]>
1 parent 9dc264a commit c309807

File tree

9 files changed

+3539
-7210
lines changed

9 files changed

+3539
-7210
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ test-backend:
372372

373373
.PHONY: test-frontend
374374
test-frontend: node_modules
375-
@NODE_OPTIONS="--experimental-vm-modules --no-warnings" npx jest --color
375+
npx vitest
376376

377377
.PHONY: test-check
378378
test-check:

jest.config.js

-15
This file was deleted.

0 commit comments

Comments
 (0)