I use @openzeppelin/test-environment
I test MyContract
contract MyContract is
Initializable,
ERC20PresetMinterPauserUpgradeable,
OwnableUpgradeable
{
function initialize(string memory name, string memory symbol)
public
override
initializer
{
ERC20PresetMinterPauserUpgradeable.initialize(name, symbol);
_mint(msg.sender, 500000000 ether);
}
}
I want to test symbol and name but when I test it, it always fails with an error that the name is undefined
beforeEach(async function () {
this.contract = await MyContract.new({
name,
symbol,
from: owner,
});
});
it("Symbol of the Token = symbol", async function () {
expect((await this.contract.symbol()).to.equal(symbol));
});
What is wrong with it?