-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Custom Solidity errors throw Uncaught TypeError with Mocha --parallel #2355
Comments
See #2331 |
@fvictorio's parallel-tests already runs successfully with |
@davidtperk: notice that that example uses a somewhat old version of Hardhat. Are you using the latest one? If so, can you please create a minimal reproducible example? |
@fvictorio yes, using |
Thank you! I'm not sure if we should consider this a Hardhat bug or a bug in my example, but I'll re-open this just in case. |
Should be a Hardhat bug because I'm having the same issue in my own project. |
Thanks a lot for finding and reporting this @davidtperk. We were about to release parallel tests support in core, but this is definitely a blocker. The underlying reason is this issue. The tl;dr is that our errors have circular references, and parallel mode serializes test errors in a way that doesn't support circular references. |
This has been fixed in v2.9.0. |
In Solidity
^0.8.0
, reverting with a custom Solidity error while testing in parallel using Mocha throws the following error:Removing the
--parallel
flag frommocha
throws the expected error:Error: VM Exception while processing transaction: reverted with custom error 'MyCustomError()'
.To reproduce, clone my fork of hardhat-examples. In the parallel-tests folder, run
yarn
followed byyarn test:parallel
, once with--parallel
in the npm script and once without.The text was updated successfully, but these errors were encountered: