How to run It works both with Hardhat localhost and hardhat node. To run, simply do: Ensure you're running node 12.0.0 or later. npm install or yarn install npx hardhat npx hardhat compile npx hardhat test --network hardhat