Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migrate from Jest to Vitest #1310

Merged
merged 230 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
230 commits
Select commit Hold shift + click to select a range
48cf64d
Setting up
arboleya Aug 26, 2023
845c7da
Adjusting tests from `packages/address`
arboleya Aug 26, 2023
ac93113
Adjusting tests from `packages/abi-typegen`
arboleya Aug 26, 2023
d99325e
Forgotten files
arboleya Aug 26, 2023
da2891a
Adjusting scripts
arboleya Aug 26, 2023
5744de1
Touchups
arboleya Aug 26, 2023
957d814
Adjusting script
arboleya Aug 26, 2023
67fb2ec
Touchups
arboleya Aug 26, 2023
23331d6
Adjusting tests for `packages/crypto`
arboleya Aug 27, 2023
e1e42fd
Adjusting tests for `packages/errors`
arboleya Aug 27, 2023
572b365
feat: implement coverage merging, reporting. Also in test workflow wi…
Sep 4, 2023
9878e46
feat: migration of functionalities from vitest
Sep 4, 2023
b39edfc
feat: further config change to implement vitest
Sep 4, 2023
9acc683
feat: some jest -> vitest syntax migration
Sep 4, 2023
e2c743c
feat: migrate jest spys to vite
Sep 5, 2023
52394ac
feat: add todo vitest mocks
Sep 5, 2023
9fa6e05
danielbate Sep 5, 2023
2018284
feat: upgrade lodash and ethers in hasher package
danielbate Sep 5, 2023
4683f34
feat: install buffer for tests
danielbate Sep 6, 2023
9f3b697
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Sep 6, 2023
149ba49
feat: add vite env and browser config
danielbate Sep 7, 2023
90a04de
Merge branch 'db/feat/implement-vitest' of https://github.com/FuelLab…
danielbate Sep 15, 2023
c927ced
chore: lint
danielbate Sep 15, 2023
aa44e62
feat: add missing test groups
danielbate Sep 16, 2023
5bbf912
feat: implement check tests module
danielbate Sep 16, 2023
2e4c7d6
chore: update lock file
danielbate Oct 2, 2023
c9eb247
feat: add missing test env tags
danielbate Oct 2, 2023
8526c0f
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Oct 2, 2023
8449d89
chore: regen lock file
danielbate Oct 2, 2023
d610c97
feat: migrate jest mocks to vite in providers
danielbate Oct 2, 2023
b69dafa
feat: add ts expect error for browser test for browser apis
danielbate Oct 2, 2023
52c8a33
feat: add missing vite restore mocks to provider test
danielbate Oct 2, 2023
eacf68b
feat: replace provider mocks with vite compatible mocks
danielbate Oct 2, 2023
dcb82ae
feat: reenable env specific tests
danielbate Oct 3, 2023
2ce501c
feat: enable ts dom lib
danielbate Oct 3, 2023
7dddd0b
efat: remove ts expect error for browser apis
danielbate Oct 3, 2023
7ee0785
feat: fallback to first faucet for vite env
danielbate Oct 3, 2023
94913c6
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Oct 6, 2023
a3e8f1e
feat: move vite config files to ts
danielbate Oct 9, 2023
b53f3d3
feat: polyfill node apis
danielbate Oct 10, 2023
30e8e54
feat: uninstall buffer in place of browser polyfill
danielbate Oct 11, 2023
bdc9ced
feat: remove node process import from vite env
danielbate Oct 11, 2023
c4615ae
feat: remove vi import from vite env
danielbate Oct 13, 2023
37c7cf8
feat: example commit with hasher hardlinked
danielbate Oct 13, 2023
3184325
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Oct 16, 2023
c480874
chore: regen lock file
danielbate Oct 16, 2023
111586e
feat: migrate all jest mocking and fix all node tests
danielbate Oct 16, 2023
14c4fe5
chore: remove redundant snapshots
danielbate Oct 16, 2023
4dfb63d
feat: add ts expect error for vite mocks
danielbate Oct 16, 2023
1d9b412
feat: add node group tags to all tests
danielbate Oct 18, 2023
a9f2333
feat: symlink fuels hasher deps
danielbate Oct 18, 2023
fb0f11f
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Oct 18, 2023
6575271
chore: regen lock file
danielbate Oct 18, 2023
6bbf9c9
feat: fix test groups
danielbate Oct 18, 2023
aba5c7e
feat: remove redundant process dep
danielbate Oct 18, 2023
fa67f72
feat: migrate to vite hooks in typegen test
danielbate Oct 18, 2023
d62716a
feat: alter coverage reporters
danielbate Oct 18, 2023
b3eaa28
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Oct 18, 2023
b8790e3
feat: add missing test group
danielbate Oct 18, 2023
79443ee
feat: reduce pnpm test commands and simplify test scripts
danielbate Oct 18, 2023
76c9dab
feat: remove browser test stage from test workflow
danielbate Oct 18, 2023
63c47c8
feat: implement browser test command
danielbate Oct 18, 2023
bb19f4b
feat: alter docs that reference jest
danielbate Oct 18, 2023
718c9ee
chore: changeset
danielbate Oct 18, 2023
ff5ee88
feat: fix doc snippets
danielbate Oct 18, 2023
87529aa
feat: don't run rewrite scripts inside vitest
danielbate Oct 18, 2023
4f49f90
feat: fix doc snippet tags
danielbate Oct 18, 2023
5df8e89
feat: add missing tsdoc files
danielbate Oct 18, 2023
dd3df95
feat: remove redundant imports
danielbate Oct 18, 2023
c29c9da
chore: linting
danielbate Oct 18, 2023
1f35487
feat: remove workflow from download artifact action in gh workflow
danielbate Oct 18, 2023
e1b3bfb
feat: alter test workflow
danielbate Oct 18, 2023
afd435c
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Oct 18, 2023
988769b
feat: add support for live node tests in vitest
danielbate Oct 18, 2023
3ffaf0e
feat: use different workflow download action
danielbate Oct 18, 2023
5c780c0
feat: fix check tests to find all tests
danielbate Oct 18, 2023
d322af1
Merge branch 'master' into db/feat/implement-vitest
danielbate Oct 19, 2023
9fdcb54
feat: migrate jest to vi in provider tests
danielbate Oct 19, 2023
80b6c99
feat: fix provider mock in provider unit test
danielbate Oct 19, 2023
a693d1e
feat: add e2e to all find tests flag
danielbate Oct 19, 2023
e22b143
feat: remove process define in place of polyfill plugin
danielbate Oct 19, 2023
a6c0d5a
feat: rename tests coverage script functions
danielbate Oct 19, 2023
17a527b
feat: fix vitest mock in mock versions test
danielbate Oct 19, 2023
6aba39a
feat: reintroduce hasher tests
danielbate Oct 19, 2023
4034447
feat: update test contribution docs
danielbate Oct 19, 2023
ecb5037
feat: rename coverage commands
danielbate Oct 19, 2023
86a7c63
Merge branch 'master' into db/feat/implement-vitest
danielbate Oct 20, 2023
76f9027
feat: add missing test groups
danielbate Oct 20, 2023
436e55b
chore: force rebuild
danielbate Oct 20, 2023
12093ca
feat: add test and coverage exclusions
danielbate Oct 23, 2023
ced206e
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Oct 23, 2023
45f738d
feat: reitroduce coverage flags
danielbate Oct 23, 2023
3e7f12d
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Oct 23, 2023
bd9e63c
feat: add missing test group
danielbate Oct 23, 2023
f367d46
feat: remove file from master merge
danielbate Oct 23, 2023
2727afb
feat: use more updated lcov workflow action
danielbate Oct 23, 2023
cbfdea6
chore: rebuild
danielbate Oct 23, 2023
7c7a46f
feat: use old coverage report action
danielbate Oct 24, 2023
48eec9b
feat: move test CI setup to a composite action
danielbate Oct 24, 2023
25d1cbc
feat: reimplement checkout to test CI
danielbate Oct 24, 2023
fec8684
feat: add shell to test setup CI action
danielbate Oct 24, 2023
778a98a
chore: force rebuild
danielbate Oct 24, 2023
a792a37
feat: fix test ci
danielbate Oct 24, 2023
429c48e
feat: create test setup action
danielbate Oct 24, 2023
066d591
feat: implement coverage diff script and PR comment action
danielbate Oct 24, 2023
f0fefc5
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Oct 24, 2023
357d81a
feat: resolve issue in previous merge conflict
danielbate Oct 24, 2023
6915a61
feat: add missing test envs
danielbate Oct 24, 2023
45f8a1f
feat: remove temp test ci stage
danielbate Oct 24, 2023
e5f1481
feat: alter find tests script to produce new diff
danielbate Oct 24, 2023
da21d01
feat: alter find tests script to produce new diff
danielbate Oct 24, 2023
de13d6b
feat: recreate coverage PR comment
danielbate Oct 25, 2023
ab0ccc7
feat: fix find test script
danielbate Oct 25, 2023
778ab06
Merge branch 'master' into db/feat/implement-vitest
danielbate Oct 25, 2023
d50ae80
Merge branch 'master' into db/feat/implement-vitest
danielbate Oct 26, 2023
064ea5e
Merge branch 'master' into db/feat/implement-vitest
arboleya Oct 28, 2023
4d225e5
Adjusting new tests (merged from master) to vite
arboleya Oct 28, 2023
67bf6f4
Adding missing test’s group tag
arboleya Oct 28, 2023
6d7cf24
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Nov 1, 2023
d3776d4
chore: regen lock file
danielbate Nov 1, 2023
0da5b7c
feat: restore contents of crypto
danielbate Nov 2, 2023
6056258
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Nov 2, 2023
36c2ff1
feat: fix crypto test mocks
danielbate Nov 2, 2023
a300aec
feat: fix shell js refactors
danielbate Nov 2, 2023
48c79aa
feat: implement filter tests command
danielbate Nov 2, 2023
79ba5ba
feat: isolate browser tests
danielbate Nov 2, 2023
9d702f6
feat: migrate test validate script to sh
danielbate Nov 2, 2023
34cf024
feat: remove browser test stages from test workflow
danielbate Nov 2, 2023
270ca18
feat: rename gen coverage script to merge coverage
danielbate Nov 2, 2023
9095349
feat: rollback crypto types change
danielbate Nov 2, 2023
37598ab
feat: fix browser types
danielbate Nov 2, 2023
ce44adf
feat: remove redundant test workflow step
danielbate Nov 2, 2023
85a79ca
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Nov 6, 2023
54431c5
chore: linting
danielbate Nov 6, 2023
e77b5b3
feat: add missing crypto tsdoc file
danielbate Nov 6, 2023
4128e4d
feat: improve test ci stage names
danielbate Nov 6, 2023
da241d6
feat: remove test that was brought in merge
danielbate Nov 6, 2023
f8e6dea
feat: migrate fuels cli work to vitest
danielbate Nov 6, 2023
ef8527e
chore: linting
danielbate Nov 6, 2023
a591573
feat: implement test matrix to speed up builds
danielbate Nov 6, 2023
d03f9ca
feat: rename test matrix stage
danielbate Nov 6, 2023
ea219a5
chore: linting
danielbate Nov 6, 2023
1b8b703
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Nov 10, 2023
b0407d0
Merging with master
arboleya Nov 10, 2023
405d8cb
Moving fixtures around
arboleya Nov 12, 2023
c5cf587
Revamping test utilities
arboleya Nov 12, 2023
b12bca8
Updating gitignore
arboleya Nov 12, 2023
a4d9b05
Re-stitching files for `build` command
arboleya Nov 12, 2023
098bb58
Re-stitching files for `dev` command
arboleya Nov 12, 2023
8efce05
Re-stitching core cli files
arboleya Nov 12, 2023
a8d8eed
Fixing broken mocks
arboleya Nov 12, 2023
892a5af
Refactoring all feature tests
arboleya Nov 12, 2023
e031b7a
Fixing all broken unit tests
arboleya Nov 12, 2023
1ca9c1f
Adding missing units
arboleya Nov 12, 2023
9130262
Re-enabling convenient html report generation
arboleya Nov 12, 2023
edfe677
Re-position flag appropriately
arboleya Nov 12, 2023
c68a994
Ensuring method interruption
arboleya Nov 12, 2023
bfd7a1a
Setting up cleanup hook
arboleya Nov 12, 2023
ebdeb13
Removing useless method call
arboleya Nov 12, 2023
ee1774a
Lintfix
arboleya Nov 12, 2023
eb7d594
Adjusting hook timing
arboleya Nov 13, 2023
76b41d3
Adding [missing] test group tag
arboleya Nov 13, 2023
4b67198
Adjusting mocks’ restoration
arboleya Nov 13, 2023
95cfa23
Lintfix
arboleya Nov 13, 2023
ec1879f
Merge branch 'master' into db/feat/implement-vitest
arboleya Nov 13, 2023
a60161e
Fixing tsconfig
arboleya Nov 13, 2023
334a59c
Fixing test mocks
arboleya Nov 13, 2023
f912eae
Lintfix
arboleya Nov 13, 2023
7170e40
Experimenting with a bigger timeout on long-running tests
arboleya Nov 13, 2023
344e44e
Removing unused import
arboleya Nov 13, 2023
9c49a7a
chore: force rebuild
danielbate Nov 13, 2023
ac5a087
Merge branch 'master' into db/feat/implement-vitest
danielbate Nov 13, 2023
a63c636
feat: rename test ci stages
danielbate Nov 13, 2023
9094626
Merge branch 'db/feat/implement-vitest' of https://github.com/FuelLab…
danielbate Nov 13, 2023
39dfe7d
chore: update changeset
danielbate Nov 14, 2023
44c90fd
feat: change test workflow stage names
danielbate Nov 14, 2023
3535ead
Merge branch 'db/feat/implement-vitest' of https://github.com/FuelLab…
danielbate Nov 14, 2023
be6b5fe
feat: reintroduce test step
danielbate Nov 14, 2023
34034d4
feat: improve diff text
danielbate Nov 14, 2023
4e01923
Merging with master
arboleya Nov 14, 2023
476d85b
Merge branch 'db/feat/implement-vitest' of github.com:FuelLabs/fuels-…
arboleya Nov 14, 2023
cbd1459
Merge branch 'master' into db/feat/implement-vitest
arboleya Nov 15, 2023
a41f0c3
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Dec 8, 2023
1dc4caa
feat: add missing test grouops
danielbate Dec 8, 2023
56261db
Merge branch 'master' into db/feat/implement-vitest
danielbate Dec 10, 2023
f59bef3
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Dec 13, 2023
0bf25a6
chore: spelling
danielbate Dec 13, 2023
9070409
chore: fix unused imports
danielbate Dec 13, 2023
3d36df2
chore: linting
danielbate Dec 13, 2023
942a874
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Dec 13, 2023
7c2b90b
chore: upgrade vite, vitest and deps
danielbate Dec 13, 2023
fae45d3
chore: remove unused ts expect errors
danielbate Dec 13, 2023
36b9b8b
test: fix import
danielbate Dec 13, 2023
bd3883d
test: update hbs assertion
danielbate Dec 13, 2023
d85aff5
test: fix forc project mocks
danielbate Dec 13, 2023
97032ef
test: fix hbs assertion
danielbate Dec 13, 2023
c95c958
Merge branch 'rc/salamander' into db/feat/implement-vitest
danielbate Dec 13, 2023
4dbaa6d
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Dec 13, 2023
84daedb
test: fix ethers mock
danielbate Dec 13, 2023
20fab39
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Dec 14, 2023
5d2c1f2
test: add missing test groups
danielbate Dec 14, 2023
f0fb72f
feat: ignore apps/docs in vite
danielbate Dec 14, 2023
d491e74
Merge branch 'rc/salamander' of https://github.com/FuelLabs/fuels-ts …
danielbate Dec 19, 2023
a884274
chore: update lock
danielbate Dec 19, 2023
b3a8bc3
test: update math mock in provider test
danielbate Dec 19, 2023
3efc6d1
Merge branch 'rc/salamander' of https://github.com/FuelLabs/fuels-ts …
danielbate Dec 19, 2023
bc0fdb9
test: fix math mock
danielbate Dec 19, 2023
03dc7c4
chore: update lock
danielbate Dec 19, 2023
5e8ea54
chore: rebuild
danielbate Dec 19, 2023
8da3eaf
chore: update lock
danielbate Dec 19, 2023
2d60c6b
chore: pin graphql request version
danielbate Dec 19, 2023
521c45b
chore: regen lock
danielbate Dec 19, 2023
13f4f02
Merge branch 'rc/salamander' of https://github.com/FuelLabs/fuels-ts …
danielbate Dec 20, 2023
f340cc4
chore: migrate to vite mts
danielbate Dec 20, 2023
ac3254c
test: resolve fuels mocks
danielbate Dec 20, 2023
baa88a6
test: add missing group
danielbate Dec 20, 2023
d41b76d
chore: DRY build sway programs test
danielbate Dec 20, 2023
10d85c3
test: remve invalid jest calls
danielbate Dec 20, 2023
c445447
chore: rebuild
danielbate Dec 20, 2023
6980c90
chore: upgrade vite deps
danielbate Dec 20, 2023
bcbeaab
chore: allocate more memory to test workflow
danielbate Dec 20, 2023
ea805d3
chore: rebuild
danielbate Dec 20, 2023
cdbd85c
chore: add nyc excluded
danielbate Dec 20, 2023
bf73922
chore: increase exclusions
danielbate Dec 20, 2023
a52efdb
Merge branch 'rc/salamander' of https://github.com/FuelLabs/fuels-ts …
danielbate Dec 20, 2023
ad794cb
chore: alter merge report
danielbate Dec 21, 2023
32c5e9d
chore: alter test runner
danielbate Dec 21, 2023
30b4627
chore: add coverage includes
danielbate Dec 21, 2023
3dd2fad
chore: try without max mem size in CI
danielbate Dec 21, 2023
f65e4bd
chore: rebuild
danielbate Dec 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .changeset/rare-snails-shave.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
---
"docs": patch
---

Migrate from Jest to Vitest
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
doc-folder-path: "apps/docs/src"

test:
environments:
runs-on: ubuntu-latest
name: ${{ matrix.env }}
strategy:
Expand Down Expand Up @@ -55,9 +55,9 @@ jobs:
name: ${{ matrix.env }}
path: coverage/environments/${{ matrix.env }}

report:
test:
nedsalk marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
needs: [test]
needs: [environments]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
3 changes: 2 additions & 1 deletion scripts/tests-coverage-diff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ const getDiff = () => {

(() => {
const { results } = getDiff();
writeFileSync('coverage/report/coverage-diff.txt', results, { flag: 'w' });
const formattedResults = results.split(`${process.cwd()}/`).join('');
writeFileSync('coverage/report/coverage-diff.txt', formattedResults, { flag: 'w' });
})();
arboleya marked this conversation as resolved.
Show resolved Hide resolved
Loading