Skip to content

re-nft/blockchain-web-app-e2e-testing-remix-wagmi

Repository files navigation

Blockchain Application Testing 101

This is the accompanying demo repository for our article on testing blockchain applications with Playwright, Anvil, and Wagmi. Be sure to check it out if you need any extra guidance!

Setting up

Make sure you have a relatively recent version of Node installed. Make sure you have Foundry's Anvil (or a comparable testnet node service) installed.

npm install

Development

Run the Vite dev server:

npm run dev

Run the following in parallel:

anvil

Testing

When you have the development server and anvil running, it's very helpful to run tests with Playwright's UI mode:

npm test -- --ui

If you want to test against a prod build and have anvil spun up automatically:

npm run build
npm test