Skip to content
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

Provide disableTimer option for testing #23

Merged
merged 1 commit into from
Sep 20, 2024
Merged

Provide disableTimer option for testing #23

merged 1 commit into from
Sep 20, 2024

Conversation

imundra
Copy link
Contributor

@imundra imundra commented Sep 18, 2024

What changed? Why?

Some consumers of cookie manager were reporting issues around introducing the package and seeing failed tests around timer usage. There are some documented alternatives like using runOnlyPendingTimers in place of functions like runAllTimers but this can quickly become cumbersome to maintain especially if there are multiple timing related functions that are being used and developers need to remember what workarounds are available for them to work well.

Therefore, this PR introduces a disableTimer option on CookieProvider to avoid setting a timer for periodically checking cookies. This option is meant to be used in testing only.

Notes to reviewers

How has it been tested?

@cb-heimdall
Copy link

cb-heimdall commented Sep 18, 2024

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

@imundra imundra merged commit 3937356 into main Sep 20, 2024
4 checks passed
@imundra imundra deleted the fix-timer-usage branch September 20, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants