-
Notifications
You must be signed in to change notification settings - Fork 74
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
Increase branch Coverage #108
Conversation
b48baa4
to
d12a91f
Compare
Pull Request Test Coverage Report for Build 6626570558
💛 - Coveralls |
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 good, just two minor suggestions
@@ -128,6 +127,22 @@ describe('EIP4337Module - Existing Safe', async () => { | |||
expect(emittedRevert).to.be.true | |||
}) | |||
|
|||
it('executeUserOpWithErrorString should execute contract calls', async () => { |
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.
One thing I actually forgot to do in the executeUserOpWithErrorString
PR is to add tests for it to the EIP4337ModuleNew.spec.ts 🙈 would be amazing if you add them
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.
Added - the revert propagation test was also missing which I added (asserting that the Safe gets deployed even if the user op reverts).
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.
Partially fixes #87
This PR adds unit tests to cover the remaining branches from the
SimpleEIP4337Module
contract. With this, we should have 100% coverage for the core contracts in the repo (although, not all paths in the test contracts are covered, which should be fine).In terms of test organisation, I added a
EIP4337Module.spec.ts
for unit tests directly targeting the module functions (validateUserOp
andexecUserOp*
).