Commit 2290982
authored
test: migrate unit tests to vitest (#637)
* test: migrate unit tests to vitest
* fix: downgrade vitest to 3.x for Node 18 CI compatibility
* fix: pin vite to 5.x for Node 18 CI compatibility
* fix: use vitest 2.x and pin vite 5.x for Node 18 compatibility
vitest 3.x/4.x pulls in vite 7.x which requires Node >=20.
Also allowlists esbuild CORS advisory (GHSA-67mh-4wv8-2f99) from
vitest>vite>esbuild — dev-only, does not affect SDK runtime.
* chore: upgrade vitest to 4.x for Node 24
Now that CI targets Node 24, use latest vitest without Node 18 workarounds.
Removes vite 5.x resolution pin and esbuild advisory allowlist entry.
Scopes vitest to unit tests only via include pattern.
* fix: use glob patterns in vitest include for workspace compatibility
* fix: increase vitest timeout to 30s for RPC-dependent tests1 parent 2e6a5b5 commit 2290982
5 files changed
Lines changed: 458 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments