-
-
Notifications
You must be signed in to change notification settings - Fork 312
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: fix beacon proposer cache unit tests #7335
Conversation
@@ -13,7 +13,7 @@ describe("BeaconProposerCache", () => { | |||
}); | |||
|
|||
it("get default", () => { | |||
expect(cache.get(32)).toBe("0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); | |||
expect(cache.getOrDefault(32)).toBe("0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); |
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.
If we you refactoring this code, will suggest to not use such magic numbers. Instead assign these values to some named constants and use in tests. Will make code more readable.
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.
did a bit of refactoring
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## unstable #7335 +/- ##
=========================================
Coverage 48.75% 48.75%
=========================================
Files 601 601
Lines 40222 40222
Branches 2061 2061
=========================================
Hits 19609 19609
Misses 20575 20575
Partials 38 38 |
Performance Report✔️ no performance regression detected Full benchmark results
|
Those tests were previously not executed due to file name not ending with
.test.ts