Skip to content

Conversation

@patricios-space
Copy link
Collaborator

@patricios-space patricios-space commented Dec 18, 2025

NONEVM-3216

  • Init blockchain once per tests suite
  • Add test coverage to mcms and timelock

@patricios-space patricios-space changed the base branch from main to cicd/provide-source-from-files December 18, 2025 16:44
@patricios-space patricios-space force-pushed the test/timelock-mcms/coverage branch from 0166caa to 6fd46cb Compare December 19, 2025 18:42
@patricios-space patricios-space changed the title Test/timelock-mcms/coverage [NONEVM-3216] Setup coverage reports for timelock/mcms Dec 26, 2025
Base automatically changed from cicd/provide-source-from-files to main December 26, 2025 14:01
@patricios-space patricios-space force-pushed the test/timelock-mcms/coverage branch from 6fd46cb to 206152d Compare December 29, 2025 14:18
@patricios-space patricios-space marked this pull request as ready for review December 29, 2025 14:59
@patricios-space patricios-space requested a review from a team as a code owner December 29, 2025 14:59
Copilot AI review requested due to automatic review settings December 29, 2025 14:59
Copy link
Contributor

Copilot AI left a 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/beforeEach pattern with blockchain snapshots for improved performance
  • Added coverage artifact generation via afterAll hooks when COVERAGE environment 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 }))
Copy link

Copilot AI Dec 29, 2025

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.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

@vicentevieytes vicentevieytes left a 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

@patricios-space patricios-space merged commit 9f83d68 into main Dec 29, 2025
35 checks passed
@patricios-space patricios-space deleted the test/timelock-mcms/coverage branch December 29, 2025 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants