-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(tests): migrate to vitest (#646)
* add vitest * modify tests * yarn lock * remove swc and jest * add types * update * update * lint * lint * proxy-memoize * fix ci * fix ci * fix * fix * lint, eslint-plugin-vitest, and ts-expect-error * Update tests/computed.test.tsx Co-authored-by: Daishi Kato <[email protected]> * Update tests/computed.test.tsx Co-authored-by: Daishi Kato <[email protected]> * Update tests/computed.test.tsx Co-authored-by: Daishi Kato <[email protected]> * Update tests/derive.test.tsx Co-authored-by: Daishi Kato <[email protected]> * Update tests/derive.test.tsx Co-authored-by: Daishi Kato <[email protected]> * Update tests/derive.test.tsx Co-authored-by: Daishi Kato <[email protected]> * Update tests/derive.test.tsx Co-authored-by: Daishi Kato <[email protected]> * Update tests/derive.test.tsx Co-authored-by: Daishi Kato <[email protected]> * Update tests/derive.test.tsx Co-authored-by: Daishi Kato <[email protected]> * Update tests/getter.test.tsx Co-authored-by: Daishi Kato <[email protected]> * Update tests/getter.test.tsx Co-authored-by: Daishi Kato <[email protected]> * merge * merge * ts ci * ts ci * ts ci * ts ci * ts ci * ts ci * ts ci * ts ci * ts ci * ts ci * update * update * update * update * update * Update package.json Co-authored-by: Daishi Kato <[email protected]> * Update vitest.config.ts Co-authored-by: Daishi Kato <[email protected]> * update * update * update * update * Update vitest.config.ts * Update vitest.config.ts * follow pmndrs/zustand#1753 * fix tests --------- Co-authored-by: Daishi Kato <[email protected]> Co-authored-by: daishi <[email protected]>
- Loading branch information
1 parent
43b9eed
commit 32a17a6
Showing
28 changed files
with
892 additions
and
1,393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,11 +52,21 @@ jobs: | |
sed -i~ '1s/^/import React from "react";/' tests/*.tsx | ||
sed -i~ 's/"jsx": "react-jsx"/"jsx": "react"/' tsconfig.json | ||
sed -i~ 's/"noUncheckedIndexedAccess": true,//' tsconfig.json | ||
yarn json -I -f package.json -e "this.resolutions={}; this.resolutions['@jest/globals']='25.5.2'; this.resolutions['pretty-format']='25.5.0'; this.resolutions['@types/prettier']='2.4.2'; this.resolutions['@types/yargs']='17.0.13'; this.resolutions['@types/node']='18.11.18';" | ||
yarn add -D @jest/[email protected] [email protected] @types/[email protected] @types/[email protected] @types/[email protected] @types/[email protected] | ||
yarn json -I -f package.json -e "this.resolutions={}; this.resolutions['pretty-format']='25.5.0'; this.resolutions['@types/prettier']='2.4.2'; this.resolutions['@types/yargs']='17.0.13'; this.resolutions['@types/node']='18.11.18';" | ||
yarn add -D [email protected] @types/[email protected] @types/[email protected] @types/[email protected] @types/[email protected] | ||
rm -r tests/macro-vite.* | ||
- name: Test ${{ matrix.typescript }} | ||
- name: Install old TypeScript | ||
run: | | ||
yarn add -D typescript@${{ matrix.typescript }} | ||
rm -r node_modules/@types/jsdom node_modules/parse5 node_modules/@types/babel__core/node_modules | ||
rm node_modules/parse5/dist/*.d.ts | ||
- name: Patch testing setup for older TS | ||
if: ${{ matrix.typescript == '3.9.7' || matrix.typescript == '3.8.3' || matrix.typescript == '3.7.5' }} | ||
run: | | ||
yarn add -D @testing-library/[email protected] @testing-library/[email protected] | ||
rm node_modules/vitest/dist/*.d.ts | ||
rm node_modules/parse5/dist/*.d.ts | ||
echo "declare module 'vitest'" >> ./src/types.d.ts | ||
- name: Test ${{ matrix.typescript }} | ||
run: | | ||
rm -r node_modules/@types/babel__core/node_modules | ||
yarn tsc --noEmit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.