-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sporadic test failures when running hardhat test
due to incorrect usage of chai matchers when hardhat >= 2.21.0
#5036
Comments
hardhat test
due to incorrect usage of chai matchers when hardhat >= 2.21.0
This is not a bug in Hardhat but a result of incorrect usage of mocha + chai. Multiple promises were running in the background, resulting in parallel execution of test assertions. This results in the sporadic failures displayed when I tested your repository. I fixed the problem by making changes to your tests. After these changes, I could no longer reproduce the sporadic failures. For anyone else experiencing sporadic failures when upgrading to Hardhat >= 2.21.0; please make sure that you're:
|
I test in 3 VMs with your PR, but still has some tests failed each time. My test environment:
|
I fixed this problem according to your suggestions. Thanks for your kindly help again. |
Version of Hardhat
What happened?
Minimal reproduction steps
The test will cost about 10 minutes.
Search terms
No response
The text was updated successfully, but these errors were encountered: