Skip to content

Latest commit

 

History

History

test-wagmi

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

@morpho-org/test-wagmi

Version MIT License Downloads per month

Wagmi-based extension of @morpho-org/test that injects a test Wagmi config as a test fixture alongside viem's anvil client.

Installation

npm install @morpho-org/test-wagmi
yarn add @morpho-org/test-wagmi

Getting Started

Export an extended vitest test:

import { createWagmiTest } from "@morpho-org/test-wagmi";
import { mainnet } from "viem/chains";

export const test = createWagmiTest(mainnet, {
  forkUrl: process.env.MAINNET_RPC_URL,
  forkBlockNumber: 19_530_000,
});

See more on its internal usage for wagmi-based tests here.