You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The doc say: "OpenZeppelin Test Helpers is web3.js based, thus Hardhat users should use the Truffle plugin for compatibility. However, we recommend instead using Hardhat Chai Matchers as a better supported alternative for Ethers.js."
So what should I use now to run the code below? The Truffle plugin or hardhat-chai-matchers?
using hardhat-chai-matchers results in:
An unexpected error occurred:
ReferenceError: contract is not defined
at Object.<anonymous> (/home/fritz/workspace/learn/test/Box.test.js:20:1)
using the truffle plugin results in:
TypeError: Box.deployed is not a function
at Context.<anonymous> (test/Box.test.js:15:13)
The text was updated successfully, but these errors were encountered:
antontranelis
changed the title
Writing automated smart contract tests: instructions are not clear and the code does not read
Writing automated smart contract tests: instructions are not clear and the code is not running
Dec 12, 2024
I have some confusion with running performing-complex-assertions in "Writing automated smart contract tests."
The doc say: "OpenZeppelin Test Helpers is web3.js based, thus Hardhat users should use the Truffle plugin for compatibility. However, we recommend instead using Hardhat Chai Matchers as a better supported alternative for Ethers.js."
So what should I use now to run the code below? The Truffle plugin or hardhat-chai-matchers?
using hardhat-chai-matchers results in:
using the truffle plugin results in:
The text was updated successfully, but these errors were encountered: