Add splitTestsCompilation solidity setting (8): Mocha updates#8135
Add splitTestsCompilation solidity setting (8): Mocha updates#8135alcuadrado merged 4 commits intodont-split-compilationsfrom
splitTestsCompilation solidity setting (8): Mocha updates#8135Conversation
|
There was a problem hiding this comment.
Pull request overview
Updates Hardhat Mocha’s test:mocha task to invoke the build task with a noTests flag that reflects the solidity.splitTestsCompilation setting, and adds regression tests to validate the build invocation behavior.
Changes:
- Pass
noTests: hre.config.solidity.splitTestsCompilationto thebuildtask when runningtest:mocha. - Add tests that override the
buildtask to capture and assert thenoTestsargument under different configs (splitTestsCompilationtrue/false,noCompiletrue).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/hardhat-mocha/src/task-action.ts | Adjusts build invocation args based on solidity.splitTestsCompilation. |
| packages/hardhat-mocha/test/index.ts | Adds tests to assert build is called with the expected noTests arg and skipped when noCompile is true. |
|
Please ignore the spellcheck failure. The spec file will be deleted before merging. |
e8842ef to
a39546a
Compare
9f86311 to
ab9a3ad
Compare
a39546a to
e61c8a7
Compare
ab9a3ad to
576a4f0
Compare
e61c8a7 to
16d93c5
Compare
576a4f0 to
bac7bca
Compare
16d93c5 to
3b8c159
Compare
bac7bca to
7eec0b3
Compare
3b8c159 to
69fd895
Compare
7eec0b3 to
e6fee07
Compare
69fd895 to
5cd78b9
Compare
e6fee07 to
21066f3
Compare
5cd78b9 to
3997e74
Compare
d01afb9 to
3b1c1fc
Compare
There was a problem hiding this comment.
Pull request overview
Updates the Hardhat Mocha plugin’s test:mocha task to invoke the build task with noTests derived from solidity.splitTestsCompilation, and adds regression tests to ensure the correct build arguments are used under different configurations.
Changes:
- Pass
noTests = hre.config.solidity.splitTestsCompilationwhen runningbuildfrom the Mocha test task. - Add tests that override the
buildtask to capture invocation args and verifynoTestsbehavior. - Add a test to ensure compilation is skipped when
noCompile: true.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/hardhat-mocha/src/task-action.ts | Adjusts build invocation to set noTests based on solidity.splitTestsCompilation. |
| packages/hardhat-mocha/test/index.ts | Adds tests that capture and assert build task arguments for different config combinations. |
There was a problem hiding this comment.
Pull request overview
Updates the Hardhat Mocha plugin’s build invocation to respect the new solidity.splitTestsCompilation setting, aligning its behavior with other built-in tasks and adding regression tests to confirm the build task arguments.
Changes:
- Change Mocha task action to call
buildwithnoTestsderived fromhre.config.solidity.splitTestsCompilation. - Add tests that override the
buildtask and assert hownoTestsis passed depending onsplitTestsCompilation. - Add a
noCompiletest to ensure compilation is skipped when requested.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/hardhat-mocha/src/task-action.ts | Adjusts build invocation to set noTests based on solidity.splitTestsCompilation. |
| packages/hardhat-mocha/test/index.ts | Adds tests to verify build is invoked with the expected noTests flag (and skipped when noCompile is true). |
There was a problem hiding this comment.
Pull request overview
Updates the Hardhat Mocha plugin’s test mocha task to invoke the build task with a noTests flag that depends on solidity.splitTestsCompilation, aligning build behavior with the new Solidity setting and adding coverage for this behavior.
Changes:
- Update the Mocha task action to call
buildwithnoTests: hre.config.solidity.splitTestsCompilation. - Extend the Mocha plugin test suite to assert
buildis called with the expectednoTestsvalue for bothsplitTestsCompilationstates and thatnoCompileskips compilation.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/hardhat-mocha/src/task-action.ts | Adjusts build invocation to pass noTests based on solidity.splitTestsCompilation. |
| packages/hardhat-mocha/test/index.ts | Adds tests validating build invocation arguments and noCompile behavior. |
2c24a0a to
c0f9741
Compare
There was a problem hiding this comment.
Pull request overview
Updates Hardhat Mocha plugin behavior to invoke the build task with noTests aligned to the new solidity.splitTestsCompilation setting, and expands test coverage to validate the new build-invocation behavior.
Changes:
- Adjust
test→mochatask action to callbuildwithnoTests = hre.config.solidity.splitTestsCompilation. - Add test cases that assert
buildis invoked withnoTests: falsewhensplitTestsCompilationis disabled, andnoTests: truewhen enabled. - Add tests ensuring
noCompile: trueskipsbuildin both configurations.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/hardhat-mocha/test/index.ts | Adds build-invocation tests that capture build args and validate noTests / noCompile behaviors. |
| packages/hardhat-mocha/src/task-action.ts | Updates build invocation to set noTests based on solidity.splitTestsCompilation. |
Just an update to how
buildis run.