Skip to content

Commit 65dfe30

Browse files
[thirdweb] chore: Update vitest to 3.0.7
1 parent 40784a2 commit 65dfe30

File tree

25 files changed

+52
-179
lines changed

25 files changed

+52
-179
lines changed

packages/service-utils/package.json

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,8 @@
2626
},
2727
"typesVersions": {
2828
"*": {
29-
"node": [
30-
"./dist/types/node/index.d.ts"
31-
],
32-
"cf-worker": [
33-
"./dist/types/cf-worker/index.d.ts"
34-
]
29+
"node": ["./dist/types/node/index.d.ts"],
30+
"cf-worker": ["./dist/types/cf-worker/index.d.ts"]
3531
}
3632
},
3733
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/pay",
@@ -40,9 +36,7 @@
4036
"url": "https://github.com/thirdweb-dev/js/issues"
4137
},
4238
"author": "thirdweb eng <[email protected]>",
43-
"files": [
44-
"dist/"
45-
],
39+
"files": ["dist/"],
4640
"sideEffects": false,
4741
"dependencies": {
4842
"@confluentinc/kafka-javascript": "^1.2.0",
@@ -53,7 +47,7 @@
5347
"@cloudflare/workers-types": "4.20250224.0",
5448
"@types/node": "22.13.5",
5549
"typescript": "5.7.3",
56-
"vitest": "3.0.7"
50+
"vitest": "3.0.5"
5751
},
5852
"scripts": {
5953
"format": "biome format ./src --write",

packages/thirdweb/src/contract/actions/resolve-abi.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ it("should throw error if contract bytecode is 0x", async () => {
6161
client: TEST_CLIENT,
6262
chain: FORKED_ETHEREUM_CHAIN,
6363
});
64-
await expect(() =>
65-
resolveAbiFromBytecode(wrongContract),
66-
).rejects.toThrowError("Failed to load contract bytecode");
64+
await expect(resolveAbiFromBytecode(wrongContract)).rejects.toThrowError(
65+
"Failed to load contract bytecode",
66+
);
6767
});

packages/thirdweb/src/extensions/erc20/read/getCurrencyMetadata.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { getCurrencyMetadata } from "./getCurrencyMetadata.js";
44

55
describe("getCurrencyMetadata", () => {
66
it("should throw if not a valid ERC20 contract", async () => {
7-
await expect(() =>
7+
await expect(
88
getCurrencyMetadata({ contract: DOODLES_CONTRACT }),
99
).rejects.toThrowError("Invalid currency token");
1010
});

packages/thirdweb/src/extensions/erc721/read/getNFTs.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ describe.runIf(process.env.TW_SECRET_KEY)("erc721.getNFTs", () => {
189189
});
190190

191191
it("should throw error if totalSupply and nextTokenIdToMint are not supported", async () => {
192-
await expect(() =>
192+
await expect(
193193
getNFTs({ contract: UNISWAPV3_FACTORY_CONTRACT }),
194194
).rejects.toThrowError(
195195
"Contract requires either `nextTokenIdToMint` or `totalSupply` function available to determine the next token ID to mint",

packages/thirdweb/src/extensions/erc721/read/getOwnedTokenIds.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe.runIf(process.env.TW_SECRET_KEY)("erc721.getOwnedTokenIds", () => {
2222
it("should throw if tokenOfOwnerByIndex or tokensOfOwner not supported", async () => {
2323
// We know current Lens contract on Polygon doesn't have this.
2424
const contract = UNISWAPV3_FACTORY_CONTRACT;
25-
await expect(() =>
25+
await expect(
2626
getOwnedTokenIds({ contract, owner: TEST_ACCOUNT_B.address }),
2727
).rejects.toThrowError(
2828
`The contract at ${contract.address} on chain ${contract.chain.id} does not support the tokenOfOwnerByIndex or tokensOfOwner interface`,

packages/thirdweb/src/extensions/lens/read/resolveAddress.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe.runIf(process.env.TW_SECRET_KEY)("resolve lens address", () => {
1414
});
1515

1616
it("should throw if passed an invalid lens handle", async () => {
17-
await expect(() =>
17+
await expect(
1818
resolveAddress({ client: TEST_CLIENT, name: "vitalik.eth" }),
1919
).rejects.toThrowError(
2020
"Could not fetch the wallet address for lens handle: vitalik.eth",

packages/thirdweb/src/extensions/prebuilts/deploy-vote.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const account = TEST_ACCOUNT_B;
99

1010
describe.runIf(process.env.TW_SECRET_KEY)("deploy-voteERC20 contract", () => {
1111
it("should throw if passed an non-integer-like value to minVoteQuorumRequiredPercent", async () => {
12-
await expect(() =>
12+
await expect(
1313
deployVoteContract({
1414
account,
1515
client: TEST_CLIENT,

packages/thirdweb/src/extensions/unstoppable-domains/read/resolveAddress.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe.runIf(process.env.TW_SECRET_KEY)(
1919
});
2020

2121
it("should throw an error with a non-existent domain name", async () => {
22-
await expect(() =>
22+
await expect(
2323
resolveAddress({
2424
name: "thirdwebsdk.thissuredoesnotexist",
2525
client: TEST_CLIENT,

packages/thirdweb/src/extensions/unstoppable-domains/read/resolveName.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe.runIf(process.env.TW_SECRET_KEY)(
1818
});
1919

2020
it("should throw error on addresses that dont own any UD", async () => {
21-
await expect(() =>
21+
await expect(
2222
resolveName({ client: TEST_CLIENT, address: TEST_ACCOUNT_D.address }),
2323
).rejects.toThrowError(
2424
`Failed to retrieve domain for address: ${TEST_ACCOUNT_D.address}. Make sure you have set the Reverse Resolution address for your domain at https://unstoppabledomains.com/manage?page=reverseResolution&domain=your-domain`,

packages/thirdweb/src/pay/convert/cryptoToFiat.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe.runIf(process.env.TW_SECRET_KEY)("Pay: crypto-to-fiat", () => {
5252
});
5353

5454
it("should throw error for testnet chain (because testnets are not supported", async () => {
55-
await expect(() =>
55+
await expect(
5656
convertCryptoToFiat({
5757
chain: sepolia,
5858
fromTokenAddress: NATIVE_TOKEN_ADDRESS,
@@ -66,7 +66,7 @@ describe.runIf(process.env.TW_SECRET_KEY)("Pay: crypto-to-fiat", () => {
6666
});
6767

6868
it("should throw error if fromTokenAddress is set to an invalid EVM address", async () => {
69-
await expect(() =>
69+
await expect(
7070
convertCryptoToFiat({
7171
chain: ethereum,
7272
fromTokenAddress: "haha",
@@ -80,7 +80,7 @@ describe.runIf(process.env.TW_SECRET_KEY)("Pay: crypto-to-fiat", () => {
8080
});
8181

8282
it("should throw error if fromTokenAddress is set to a wallet address", async () => {
83-
await expect(() =>
83+
await expect(
8484
convertCryptoToFiat({
8585
chain: base,
8686
fromTokenAddress: TEST_ACCOUNT_A.address,
@@ -99,7 +99,7 @@ describe.runIf(process.env.TW_SECRET_KEY)("Pay: crypto-to-fiat", () => {
9999
status: 400,
100100
statusText: "Bad Request",
101101
});
102-
await expect(() =>
102+
await expect(
103103
convertCryptoToFiat({
104104
chain: base,
105105
fromTokenAddress: NATIVE_TOKEN_ADDRESS,

0 commit comments

Comments
 (0)