diff --git a/test-setup/anvil.ts b/test-setup/anvil.ts deleted file mode 100644 index 35d83f4304..0000000000 --- a/test-setup/anvil.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { beforeAll, beforeEach } from "vitest"; -import { testClient } from "./common"; - -// Some test suites deploy contracts in a `beforeAll` handler, so we restore chain state here. -beforeAll(async () => { - const state = await testClient.dumpState(); - return async (): Promise => { - await testClient.loadState({ state }); - }; -}); - -// Some tests execute transactions, so we restore chain state here. -beforeEach(async () => { - const state = await testClient.dumpState(); - return async (): Promise => { - await testClient.loadState({ state }); - }; -}); diff --git a/test-setup/global/anvil.ts b/test-setup/global/anvil.ts deleted file mode 100644 index f424fc5b0a..0000000000 --- a/test-setup/global/anvil.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { startProxy as startAnvilProxy } from "@viem/anvil"; -import { anvilHost, anvilPort } from "../common"; -import { execa } from "execa"; - -export default async function globalSetup(): Promise<() => Promise> { - console.log("building mock game"); - await execa("pnpm", ["run", "build"], { - cwd: `${__dirname}/../../test/mock-game-contracts`, - }); - - const shutdownAnvilProxy = await startAnvilProxy({ - host: anvilHost, - port: anvilPort, - }); - - return async () => { - await shutdownAnvilProxy(); - }; -}