-
Notifications
You must be signed in to change notification settings - Fork 4
[NONEVM-3216] Setup coverage reports for timelock/mcms #459
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
0166caa to
6fd46cb
Compare
6fd46cb to
206152d
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.
Pull request overview
This PR implements test coverage reporting for the MCMS (Many Chain Multi-Sig) and RBAC Timelock test suites. The changes refactor test setup to initialize the blockchain once per test suite rather than per test, and add coverage artifact generation hooks.
Key changes:
- Refactored test setup to use
beforeAll/beforeEachpattern with blockchain snapshots for improved performance - Added coverage artifact generation via
afterAllhooks whenCOVERAGEenvironment variable is set - Replaced hardcoded contract IDs with randomly generated ones to avoid collisions
Reviewed changes
Copilot reviewed 24 out of 26 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| RBACTimelockUpdateDelay.spec.ts | Updated to use new test setup pattern and added coverage generation |
| RBACTimelockScheduleBatch.spec.ts | Updated to use new test setup pattern and added coverage generation |
| RBACTimelockReceivable.spec.ts | Updated to use new test setup pattern and added coverage generation |
| RBACTimelockHashing.spec.ts | Updated to use new test setup pattern and added coverage generation |
| RBACTimelockGetters.spec.ts | Updated to use new test setup pattern and added coverage generation |
| RBACTimelockExecuteErrorOracle.spec.ts | Updated to use new test setup pattern, added coverage generation, and switched to random contract IDs |
| RBACTimelockExecute.spec.ts | Updated to use new test setup pattern, added coverage generation, and switched to random contract IDs |
| RBACTimelockConstructor.spec.ts | Updated to use new test setup pattern and added coverage generation |
| RBACTimelockCancel.spec.ts | Updated to use new test setup pattern and added coverage generation |
| RBACTimelockBlockFunction.spec.ts | Updated to use new test setup pattern and added coverage generation |
| RBACTimelock.spec.ts | Moved blockchain initialization to beforeAll, added coverage support, and switched to random contract IDs |
| ManyChainMultiSigSubgroups.spec.ts | Moved blockchain initialization to beforeAll, added coverage support, and switched to random contract IDs |
| ManyChainMultiSigSetRoot.spec.ts | Updated to use new test setup pattern and added coverage generation |
| ManyChainMultiSigSetConfig.spec.ts | Updated to use new test setup pattern, added coverage generation, and improved test data cloning |
| ManyChainMultiSigExecuteErrorOracle.spec.ts | Updated to use new test setup pattern and added coverage generation |
| ManyChainMultiSigExecute.spec.ts | Updated to use new test setup pattern and added coverage generation |
| ManyChainMultiSigDomainSeparation.spec.ts | Updated to use new test setup pattern and added coverage generation |
| ManyChainMultiSigBaseTest.ts | Refactored to support blockchain snapshots, added coverage generation, and implemented new setup patterns |
| MCMS.spec.ts | Moved blockchain initialization to beforeAll, added coverage support, and switched to random contract IDs |
| Integration.spec.ts | Moved blockchain initialization to beforeAll, added coverage support, and switched to random contract IDs |
| BaseTest.ts | Refactored to support blockchain snapshots, added coverage generation, and implemented new setup patterns |
| WithdrawableSpec.ts | Fixed missing await keywords on testDrain function calls |
| OnRamp.setDynamicConfig.spec.ts | Fixed missing await keyword on coverage generation call |
| FeeQuoter.getValidatedFee.spec.ts | Fixed incorrect skip syntax from skip(...) to it.skip(...) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| await baseTest.beforeEach() | ||
| }) | ||
|
|
||
| const cloneTestSigners = (): TestSigner[] => baseTest.testSigners.map((signer) => ({ ...signer })) |
Copilot
AI
Dec 29, 2025
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.
The cloneTestSigners function creates shallow copies of signers which may cause issues if the signer objects have nested properties that are mutated. Consider making this a method of the base test class where proper deep cloning logic can be centralized.
vicentevieytes
left a comment
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.
Thank you for tackling this
NONEVM-3216