-
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
[4337 Module] Increase test coverage to 99+% #87
Comments
This was referenced Oct 19, 2023
nlordell
added a commit
that referenced
this issue
Oct 23, 2023
In implementing #87, I realised that a lot of the missing code coverage by lines were in the `UserOperationLib` source file. Since this is only used by test contracts (in particular the test entry point and the mock 4337 Safe), I moved the code around/cleaned up dead code to increase the coverage of the "main" contracts. In particular: * The `UserOperation` struct definition moved to the 4337 interface file (felt natural as the struct is part of the 4337 account interface) * Moved the `UserOperationLib` library to the `test/` subdirectory, the only place it was being used * I also got rid of some dead code, library functions that weren't being used anywhere * Deduplicated the `Account` interface from the test entry point * Fixed some Solidity warning lints (that weren't causing CI errors - should we change CI to fail on these warnings as well?)
nlordell
added a commit
that referenced
this issue
Oct 24, 2023
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` and `execUserOp*`).
Looks like GitHub auto-closed this issue with the #108 PR ("partially fixes $ISSUE" is interpreted as "fixes $ISSUE") 🙈. |
Closing as the required tasks are implemented. The good to have isn't quite done, but there is a draft PR open for it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: