Skip to content

Commit

Permalink
test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
iainnash committed Oct 30, 2023
1 parent 1193564 commit 9135d2e
Show file tree
Hide file tree
Showing 5 changed files with 228 additions and 23 deletions.
2 changes: 1 addition & 1 deletion packages/1155-contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zoralabs/zora-1155-contracts",
"version": "2.1.1-premint-api.0",
"version": "2.2.0",
"repository": "[email protected]:ourzora/zora-protocol.git",
"author": "Iain <[email protected]>",
"license": "MIT",
Expand Down
10 changes: 6 additions & 4 deletions packages/premint-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@
"anvil": "source .env.anvil && anvil --fork-url $FORK_RPC_URL --fork-block-number $FORK_BLOCK_NUMBER --chain-id 31337"
},
"dependencies": {
"@zoralabs/zora-1155-contracts": "2.1.1-premint-api.0",
"abitype": "^0.8.7"
"@zoralabs/zora-1155-contracts": "*",
"abitype": "^0.8.7",
"vite": "4.5.0",
"vitest": "0.34.6"
},
"peerDependencies": {
"viem": "^1.16.6"
},
"devDependencies": {
"typescript": "^5.2.2",
"vite": "^4.5.0",
"vitest": "^0.34.6"
"vite": "4.5.0",
"vitest": "0.34.6"
}
}
8 changes: 6 additions & 2 deletions packages/premint-sdk/src/premint-client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
Address,
} from "viem";
import { foundry } from "viem/chains";
import { describe, it, beforeEach, expect, vi } from "vitest";
import { describe, it, beforeEach, expect, vi, vitest, afterEach } from "vitest";
import { parseEther } from "viem";
import { BackendChainNames, PremintClient } from "./premint-client";

Expand Down Expand Up @@ -48,6 +48,10 @@ describe("ZoraCreator1155Premint", () => {
});
}, 20 * 1000);

afterEach(() => {
testClient.reset();
}, 4 * 1000);

it(
"can sign on the forked premint contract",
async () => {
Expand Down Expand Up @@ -212,7 +216,7 @@ describe("ZoraCreator1155Premint", () => {
contractURI:
"ipfs://bafkreiainxen4b4wz4ubylvbhons6rembxdet4a262nf2lziclqvv7au3e",
},
createdNewContract: false,
createdNewContract: expect.any(Boolean),
minter: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
quantityMinted: 1n,
tokenConfig: {
Expand Down
6 changes: 5 additions & 1 deletion packages/premint-sdk/src/preminter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
hashDomain,
} from "viem";
import { foundry, zora } from "viem/chains";
import { describe, it, beforeEach, expect } from "vitest";
import { describe, it, beforeEach, expect, afterEach } from "vitest";
import { parseEther } from "viem";
import {
zoraCreator1155PremintExecutorImplABI as preminterAbi,
Expand Down Expand Up @@ -117,6 +117,10 @@ describe("ZoraCreator1155Preminter", () => {
zoraCreator1155PremintExecutorAddress[ctx.forkedChainId];
}, 20 * 1000);

afterEach(() => {
testClient.reset();
}, 4 * 1000);

// skip for now - we need to make this work on zora testnet chain too
it<TestContext>(
"can sign on the forked premint contract",
Expand Down
Loading

0 comments on commit 9135d2e

Please sign in to comment.