1
vote
UNIT Test Error: No Contract deployed with name Raffle
I found the answer.The error was,
This line module.exports.tags = ['all', 'mocks']; was inside the deploy script's curly brackets...
1
vote
evm_increaseTime in hardhat
In order to advance time when testing with Hardhat, you have to use the network provider's increase_time method. Here's a code of what it should look like
const { network } = require("hardhat&...
1
vote
Accepted
Hardhat chain fork on the test rather than config file
yes
just change your network (add this with your api key to the before each):
await hre.network.provider.request({
method: "hardhat_reset",
params: [{forking: {
...
1
vote
Modify block number when testing with Hardhat
There's now a Hardhat method exactly for that:
From hardhat docs:
// mine 256 blocks
await hre.network.provider.send("hardhat_mine", ["0x100"]);
// mine 1000 blocks with an ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
testing × 486solidity × 208
truffle × 190
hardhat × 64
testrpc × 38
unittesting × 38
contract-development × 37
truffle-test × 37
javascript × 33
mocha × 33
go-ethereum × 30
testnets × 29
web3js × 28
ganache × 27
ethers.js × 22
remix × 18
blockchain × 12
erc-20 × 12
contract-deployment × 12
private-blockchain × 12
dapp-development × 12
events × 10
contract-debugging × 10
truffle-migration × 10
transactions × 9