-
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
Node test runner plugin supporting js tests #5584
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I think the CI is failing due to the pnpm problem that @galargh mentioned |
cba99ee
to
ef5961d
Compare
ef5961d
to
af476fc
Compare
af476fc
to
d287414
Compare
I see you already found the fix in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great 😸 I left a couple of questions to ensure I understand all the changes being made. I hope you don't mind I'm trying to use the review process as a learning opportunity, too.
The main items I couldn't find definite answers for myself were:
- Do we want to cover all the test cases outlined in the Design Doc in this iteration?
- Should
hre
injection into the context be supported after all or not? I thought imports were supposed to be the only path, but I wanted to double-check.
Testing
- Ran
pnpm hardhat test
in theexample-project
Review Checklist (copied from the issue)
- Add a new
@ignored/hardhat-node-test-runner
package under./v-next
- It is called
@ignored/hardhat-vnext-node-test-runner
which follows the guidelines forv-next
packages.
- It is called
- Implement as a plugin task shim code similar to v2 mocha, that runs the designated test folder js/ts files as tests in Node test runner. Before the tests are run the HRE should be initialized and injected into the context.
- HRE can be imported in the tests, it does not need to be injected.
- Include the Hardhat custom test reporter in the default execution
- Add
@ignored/hardhat-node-test-runner
to the example project and add some basic integration tests confirming that testing works and that the hre is being initialized - Add support for
--only
to thenpx hardhat test
command - Add cli support for testFiles an optional list of test files
Out of Scope (copied from the issue)
- Coverage
- Gas reporting
- Parallel test execution
- Support for console.log in tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed the PR, and it looks like Piotr caught everything I would have (and probably more)! 😅 LGTM once these are addressed.
I'll review this PR tomorrow morning |
aa508ba
to
c856215
Compare
882e59c
to
5956f9a
Compare
f4dd8d6
to
79c2c99
Compare
fc16205
to
7066c7b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a comment to remove a console.log
, apart from that this looks ready to be merged
Co-authored-by: Piotr Galar <[email protected]>
Co-authored-by: Patricio Palladino <[email protected]>
bea4479
to
c2d5655
Compare
closes #5534