[Solved] mocha/chai.js testing harness: https calls do not work from after() function

I believe I have found a solution. In after(), if you asynchronously invoke some endpoint on a service external to your testing environment, then that asynchronous call is queued and not immediately executed. This is the nature of calling asynchronous functions in node.js. Well, if there is no logic after the after() call, then mocha … Read more

[Solved] TypeError: Cannot read properties of undefined (reading ‘equal’) [closed]

You didn’t close the parenthesis around the expect calls in the second test correctly. You’re accessing .to on the number returned by .balanceOf. Replace with: expect(await hardhatToken.balanceOf(addr1.address)).to.equal(10); // … expect(await hardhatToken.balanceOf(addr2.address)).to.equal(5); 2 solved TypeError: Cannot read properties of undefined (reading ‘equal’) [closed]