Skip to content

Conversation

@muir
Copy link
Collaborator

@muir muir commented Apr 9, 2025

Updates the test to increase test coverage

@codecov-commenter
Copy link

codecov-commenter commented Apr 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.29%. Comparing base (cd6d40c) to head (41123bd).

Additional details and impacted files
@@             Coverage Diff             @@
##             main       #5       +/-   ##
===========================================
+ Coverage   55.55%   96.29%   +40.74%     
===========================================
  Files           1        1               
  Lines          54       54               
===========================================
+ Hits           30       52       +22     
+ Misses         23        2       -21     
+ Partials        1        0        -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

limit_test.go:38

  • [nitpick] The identifier 'sync.OnceFunc' is unconventional since the standard library provides 'sync.Once'. Consider renaming or documenting 'sync.OnceFunc' to clarify its purpose.
noteStuckCalled := sync.OnceFunc(func() {

limit_test.go:20

  • [nitpick] The test function name 'TestLimitSilent' may not fully reflect its behavior compared to 'TestLimitVerbose'. Consider renaming these tests to more explicitly describe the expected behavior in each scenario.
func TestLimitSilent(t *testing.T) {

@muir muir requested a review from Copilot April 9, 2025 17:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

limit_test.go:61

  • [nitpick] Consider adding a comment to clarify the rationale for using modulo 3 to differentiate the test branches, which would help future maintainers understand the purpose of each case.
switch i % 3 {

@muir muir merged commit ad1acbf into main Apr 9, 2025
29 checks passed
@muir muir deleted the coverage branch April 9, 2025 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants