-
Notifications
You must be signed in to change notification settings - Fork 24
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
ref: Add/Sub Assignment Operations + e2e-tests.sh #467
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for contracts-stylus canceled.
|
// For each account, the nonce has an initial value of 0, can only be | ||
// incremented by one, and cannot be decremented or reset. This | ||
// guarantees that the nonce never overflows. |
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.
Add comment from Solidity version
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files
|
cargo test --features std,e2e --test "*" | ||
else | ||
cargo test --features std,e2e "$@" | ||
fi |
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 script can now be called in the following ways:
- if no arguments are passed, the behavior is the same as before
- otherwise, pass whatever arguments are present to
cargo test
directly
We can now easily filter for even unit tests with this script.
This should cover most of our testing needs.
NOTE: feel free to suggest or add any additional feature you think might be useful.
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.
An other option is to omit the if-statement, and just call cargo test --features std,e2e "$@"
, passing whatever arguments to the command. In our e2e workflow, we'd then call the script like ./scripts/e2e-tests.sh --test "*"
.
I'd be more in favor of this approach, but my first instinct was to keep the existing behavior as much as possible, and only change it after discussing it with you guys.
At this point it's really a matter of taste
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.
I believe we can apply #[allow(clippy::used_underscore_binding)]
for the whole contracts library
Resolves #445, Resolves #443
PR Checklist