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 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
silverwind 2022-10-14 15:36:16 +02:00 committed by GitHub
parent 9dc264a2ee
commit c3098076b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 525 additions and 4196 deletions

View file

@ -56,8 +56,8 @@ test('joinPaths', () => {
});
test('isObject', () => {
expect(isObject({})).toBeTrue();
expect(isObject([])).toBeFalse();
expect(isObject({})).toBeTruthy();
expect(isObject([])).toBeFalsy();
});
test('uniq', () => {