-
Notifications
You must be signed in to change notification settings - Fork 64
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
chore: add yarn coverage
to generate coverage report
#170
Conversation
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.
just 2 small comments
WalkthroughThe recent updates enhance code coverage reporting and streamline testing in the Hardhat project. By incorporating the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 1
Outside diff range and nitpick comments (1)
scripts/generate_addresses_types.ts (1)
Line range hint
21-21
: ReplaceisNaN
withNumber.isNaN
for more reliable type checks.The current use of
isNaN
might lead to unintended type coercions. UsingNumber.isNaN
ensures that the value being checked is of type number, providing more reliable checks.- const isNumeric = uniqueValues.every((value) => !isNaN(Number(value))); + const isNumeric = uniqueValues.every((value) => !Number.isNaN(Number(value)));
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (4)
- .gitignore (1 hunks)
- hardhat.config.ts (1 hunks)
- package.json (1 hunks)
- scripts/generate_addresses_types.ts (1 hunks)
Files skipped from review due to trivial changes (2)
- .gitignore
- hardhat.config.ts
Additional context used
Path-based instructions (1)
scripts/generate_addresses_types.ts (1)
Pattern
scripts/**
: Review the scripts for best practices.
Biome
scripts/generate_addresses_types.ts
[error] 21-21: isNaN is unsafe. It attempts a type coercion. Use Number.isNaN instead. (lint/suspicious/noGlobalIsNan)
See the MDN documentation for more details.
Unsafe fix: Use Number.isNaN instead.
Additional comments not posted (2)
package.json (2)
79-79
: Good addition of thecoverage
script.This script enhances the developer's ability to generate and view coverage reports, aligning with the PR's objectives to improve code quality monitoring.
86-86
: Simplifiedtest
script is a good improvement.Directly using
npx hardhat test
simplifies the testing process and aligns with modern best practices for script simplicity and directness.
All in the PR title
Summary by CodeRabbit
New Features
Chores
.gitignore
to exclude coverage-related files.build
andtest
scripts inpackage.json
for improved testing and coverage reporting.