I have a simple test to mint tokens on a newly deployed contract.
While developing, I was testing locally and the test never failed. Now that the contract is deployed to the testnet, I get a 50% failure rate in my test.
I can check the contract on Snowtrace and see that the mint function was executed properly.
My question is why are the await
's not being obeyed?
See the test in question:
it("should allow owner to mint tokens", async function () {
await contract.deployed();
await expect(() => contract.mint(bobAddress, fiveHundred))
.to.changeTokenBalance(contract, bob, (500 * (10 ** (decimals))).toString());
});