-
Notifications
You must be signed in to change notification settings - Fork 174
Get unit tests running again #597
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
Conversation
Whoa, know why? Isn't
Yes, at least an error like that. We should give NomicFoundation/hardhat#3205 a try... |
I'm guessing because |
This gets rid of the dependency on `ethereum-waffle` and uses a patched version of `hardhat-chai-matchers`, built from the same branch as our (updated) patched `hardhat`. It attempts to preserve the interface we were using to match errors as much as possible, but there were a few tests that needed to be updated. Notably, the matcher we are currently using doesn't have the ability to match custom error arguments. We might want to switch to matching with `revertedWithCustomError` if there are improvements and/or this stabilizes in the future, but for now attempted to keep minimal changes to tests with the matcher changes. We also move the Comet errors into the interface, in order to make things simpler/more consistent for the future, even though its not totally necessary right now.
e6f06a9
to
b6bb097
Compare
Does this mean we'll need a governance proposal to merge these changes? |
@jflatow I don't think I can approve this since I opened the original PR, but LGTM! |
It looks like our unit tests stopped running after #594
If you run
yarn test
oryarn hardhat test
locally, 0 unit tests will get run.Our hardhat config currently defines the test path with a glob:
This worked, up until some version of Hardhat. But it appears that defining multiple paths is no longer supported (maybe never was officially supported).
Related issue: NomicFoundation/hardhat#2699
This change alters the
test
script to include all of our tests as arguments. And it updates the Hardhat config to use a path that Hardhat actually recognizes.This will get tests running locally and in CI, but has the unfortunate side effect that running☹️
yarn test
andyarn hardhat test
will run two different sets of testsThe tests run but fail with:
🍯 This is the error that your Hardhat patch was intended to fix, correct?
Does the latest release of your forked Hardhat include the patch?