I'm trying to run a test with hardhat, and have it deploy my deployments/fixtures with the command:
npx hardhat test --network rinkeby --deploy-fixture
When I run this, I get the following error:
ProviderError: The method evm_snapshot does not exist/is not available
I have a deploy
folder containing all my methods to deploy, and npx hardhat deploy --network rinkeby
works great.
What gives?
Best Answer
The fixture functionality currently doesn't work for testnets. If you want to run your tests on a testnet, you'll first have to deploy the contracts, and then run your tests.