Skip to content

Commit 00325b0

Browse files
committed
chore: up vitest
1 parent fc9da1b commit 00325b0

21 files changed

+664
-833
lines changed

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@
5757
"@size-limit/preset-big-lib": "^11.2.0",
5858
"@types/bun": "^1.2.22",
5959
"@types/node": "^24.5.2",
60-
"@vitest/coverage-v8": "^3.2.4",
61-
"@vitest/ui": "^3.2.4",
60+
"@vitest/coverage-v8": "^4.0.10",
6261
"bun": "^1.2.22",
6362
"ethers": "^6.15.0",
6463
"knip": "^5.64.0",
@@ -70,9 +69,9 @@
7069
"simple-git-hooks": "^2.13.1",
7170
"size-limit": "^11.2.0",
7271
"typescript": "catalog:",
73-
"vitest": "^3.2.4"
72+
"vitest": "^4.0.10"
7473
},
75-
"packageManager": "pnpm@10.16.1",
74+
"packageManager": "pnpm@10.22.0",
7675
"engines": {
7776
"node": ">=24.5"
7877
},
@@ -262,7 +261,7 @@
262261
"tar-fs@>=3.0.0 <3.1.1": ">=3.1.1",
263262
"vite@>=6.0.0 <=6.4.0": "6.4.1",
264263
"hono@>=1.1.0 <4.10.2": "4.10.2",
265-
"glob@>=10.3.7 <=11.0.3": "11.1.0"
264+
"glob@>=10.3.7 <=11.0.3": ">=11.1.0"
266265
},
267266
"onlyBuiltDependencies": [
268267
"bun",

pnpm-lock.yaml

Lines changed: 168 additions & 277 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ catalog:
1010
typescript: ^5.9.2
1111
minimumReleaseAge: 1440
1212
minimumReleaseAgeExclude:
13+
- '@vitest/*'
14+
- glob
1315
- hono
16+
- vitest
1417
- vocs
1518
packages:
1619
- examples/*

src/actions/public/multicall.test.ts

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ test('args: allowFailure', async () => {
101101
})
102102

103103
test('args: batchSize', async () => {
104+
vi.resetAllMocks()
104105
const spy_1 = vi.spyOn(readContract, 'readContract')
105106
expect(
106107
await multicall(client, {
@@ -198,6 +199,7 @@ test('args: batchSize', async () => {
198199
`)
199200
expect(spy_1).toBeCalledTimes(3)
200201

202+
vi.resetAllMocks()
201203
const spy_2 = vi.spyOn(readContract, 'readContract')
202204
await multicall(client, {
203205
batchSize: 32,
@@ -220,6 +222,7 @@ test('args: batchSize', async () => {
220222
})
221223
expect(spy_2).toBeCalledTimes(2)
222224

225+
vi.resetAllMocks()
223226
const spy_3 = vi.spyOn(readContract, 'readContract')
224227
await multicall(client, {
225228
batchSize: 0,
@@ -552,8 +555,6 @@ describe('errors', async () => {
552555
- The parameters passed to the contract function may be invalid, or
553556
- The address is not a contract.
554557
555-
Contract Call:
556-
address: 0x0000000000000000000000000000000000000000
557558
558559
Docs: https://viem.sh/docs/contract/multicall
559560
Version: [email protected]],
@@ -604,7 +605,6 @@ describe('errors', async () => {
604605
- The address is not a contract.
605606
606607
Contract Call:
607-
address: 0x0000000000000000000000000000000000000000
608608
function: balanceOf(address account)
609609
args: (0xd8da6bf26964af9d7eed9e03e53415d37aa96045)
610610
@@ -658,7 +658,6 @@ describe('errors', async () => {
658658
- The address is not a contract.
659659
660660
Contract Call:
661-
address: 0x0000000000000000000000000000000000000000
662661
function: balanceOf(address account)
663662
args: (0xd8da6bf26964af9d7eed9e03e53415d37aa96045)
664663
@@ -724,7 +723,6 @@ describe('errors', async () => {
724723
ERC721: transfer caller is not owner nor approved
725724
726725
Contract Call:
727-
address: 0x0000000000000000000000000000000000000000
728726
function: transferFrom(address from, address to, uint256 tokenId)
729727
args: (0xd8da6bf26964af9d7eed9e03e53415d37aa96045, 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266, 1)
730728
@@ -742,7 +740,6 @@ describe('errors', async () => {
742740
EnumerableSet: index out of bounds
743741
744742
Contract Call:
745-
address: 0x0000000000000000000000000000000000000000
746743
function: tokenOfOwnerByIndex(address owner, uint256 index)
747744
args: (0xd8da6bf26964af9d7eed9e03e53415d37aa96045, 1)
748745
@@ -801,7 +798,6 @@ describe('errors', async () => {
801798
You can look up the decoded signature here: https://openchain.xyz/signatures?query=0xf9006398.
802799
803800
Contract Call:
804-
address: 0x0000000000000000000000000000000000000000
805801
function: simpleCustomRead()
806802
807803
Docs: https://viem.sh/docs/contract/decodeErrorResult
@@ -951,8 +947,6 @@ describe('errors', async () => {
951947
- The parameters passed to the contract function may be invalid, or
952948
- The address is not a contract.
953949
954-
Contract Call:
955-
address: 0x0000000000000000000000000000000000000000
956950
957951
Docs: https://viem.sh/docs/contract/multicall
958952
Version: [email protected]],
@@ -993,8 +987,6 @@ describe('errors', async () => {
993987
[ContractFunctionExecutionError: Function "lol" not found on ABI.
994988
Make sure you are using the correct ABI and that the function exists on it.
995989
996-
Contract Call:
997-
address: 0x0000000000000000000000000000000000000000
998990
999991
Docs: https://viem.sh/docs/contract/encodeFunctionData
1000992
@@ -1028,7 +1020,6 @@ describe('errors', async () => {
10281020
Given length (values): 2
10291021
10301022
Contract Call:
1031-
address: 0x0000000000000000000000000000000000000000
10321023
function: balanceOf(address account)
10331024
args: (0xd8da6bf26964af9d7eed9e03e53415d37aa96045)
10341025
@@ -1068,7 +1059,6 @@ describe('errors', async () => {
10681059
- The address is not a contract.
10691060
10701061
Contract Call:
1071-
address: 0x0000000000000000000000000000000000000000
10721062
function: balanceOf(address account)
10731063
args: (0xd8da6bf26964af9d7eed9e03e53415d37aa96045)
10741064
@@ -1112,7 +1102,6 @@ describe('errors', async () => {
11121102
ERC721: transfer caller is not owner nor approved
11131103
11141104
Contract Call:
1115-
address: 0x0000000000000000000000000000000000000000
11161105
function: transferFrom(address from, address to, uint256 tokenId)
11171106
args: (0xd8da6bf26964af9d7eed9e03e53415d37aa96045, 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266, 1)
11181107
@@ -1159,7 +1148,6 @@ describe('errors', async () => {
11591148
You can look up the decoded signature here: https://openchain.xyz/signatures?query=0xf9006398.
11601149
11611150
Contract Call:
1162-
address: 0x0000000000000000000000000000000000000000
11631151
function: simpleCustomRead()
11641152
11651153
Docs: https://viem.sh/docs/contract/decodeErrorResult

src/actions/public/waitForTransactionReceipt.test.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ describe('replaced transactions', () => {
226226
onReplaced: (replacement_) => (replacement = replacement_),
227227
}),
228228
(async () => {
229-
await wait(100)
229+
await wait(500)
230230

231231
// speed up
232232
await sendTransaction(client, {
@@ -271,7 +271,7 @@ describe('replaced transactions', () => {
271271
hash,
272272
}),
273273
(async () => {
274-
await wait(100)
274+
await wait(500)
275275

276276
// speed up
277277
await sendTransaction(client, {
@@ -318,7 +318,7 @@ describe('replaced transactions', () => {
318318
onReplaced: (replacement_) => (replacement = replacement_),
319319
}),
320320
(async () => {
321-
await wait(100)
321+
await wait(500)
322322

323323
// speed up
324324
await sendTransaction(client, {
@@ -367,7 +367,7 @@ describe('replaced transactions', () => {
367367
onReplaced: (replacement_) => (replacement = replacement_),
368368
}),
369369
(async () => {
370-
await wait(100)
370+
await wait(500)
371371

372372
// speed up
373373
await sendTransaction(client, {
@@ -415,7 +415,7 @@ describe('replaced transactions', () => {
415415
onReplaced: (replacement_) => (replacement = replacement_),
416416
}),
417417
(async () => {
418-
await wait(100)
418+
await wait(500)
419419

420420
// speed up
421421
await sendTransaction(client, {
@@ -462,7 +462,7 @@ describe('replaced transactions', () => {
462462
onReplaced: (replacement_) => (replacement = replacement_),
463463
}),
464464
(async () => {
465-
await wait(100)
465+
await wait(500)
466466

467467
// speed up
468468
await sendTransaction(client, {
@@ -511,7 +511,7 @@ describe('replaced transactions', () => {
511511
})
512512

513513
// Replace the transaction with a higher gas price
514-
await wait(100)
514+
await wait(500)
515515
await sendTransaction(client, {
516516
account: sourceAccount.address,
517517
to: targetAccount.address,
@@ -580,7 +580,7 @@ describe('args: confirmations', () => {
580580
hash,
581581
}),
582582
(async () => {
583-
await wait(100)
583+
await wait(500)
584584

585585
// speed up
586586
await sendTransaction(client, {
@@ -644,7 +644,7 @@ describe('errors', () => {
644644
hash,
645645
}),
646646
(async () => {
647-
await wait(100)
647+
await wait(500)
648648

649649
// speed up
650650
await sendTransaction(client, {

0 commit comments

Comments
 (0)