-
Notifications
You must be signed in to change notification settings - Fork 114
test: increase code coverage across various modules #1409
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- `_upsertSession` paths: no user (no SW notify), user + SW supported (calls `_notifySWToUpsertSession` + installs listeners once), no SW (sets `_onSessionSent` on `_UserCreate`, emits `SESSION_STARTED`). - `_notifySWToUpsertSession` builds proper payload and posts to worker messenger. - `_handleOnFocus`/`_handleOnBlur` wait for `LoginManager._switchingUsersPromise` and log on errors (augment existing switching-user tests).
- Constructor respects enable false early-return; defaults for size/position/theme; installs hooks/updates state when enabled. - State transitions when `_subscribed`/`_unsubscribed`/`_blocked` flags change trigger message/display logic guards.
Tests for: - triggers events - unsubscribed + not optedOut → calls register flow - toggles dialog path and hides message - resets handling flag
- `_show`/`_hide` set `_shown` and resolve promises - visibility classes toggle
…te` clears activation
… `_hide` idempotency
…oken path; transfer subscription path
…ent hooks install once; native vs slidedown gating
…f non-empty; returns `{}` and warns when no diff; stores remote/local tags mutate internal state
… error on timeout; `enforceAppId`/`enforceAlias` throw and pass when expected
- Maps Notification permission states - guards for unavailable API in environment
fadi-george
reviewed
Nov 18, 2025
fadi-george
reviewed
Nov 18, 2025
fadi-george
reviewed
Nov 18, 2025
fadi-george
reviewed
Nov 18, 2025
fadi-george
reviewed
Nov 18, 2025
fadi-george
reviewed
Nov 18, 2025
fadi-george
reviewed
Nov 18, 2025
fadi-george
reviewed
Nov 18, 2025
fadi-george
reviewed
Nov 18, 2025
fadi-george
reviewed
Nov 18, 2025
fadi-george
reviewed
Nov 18, 2025
fadi-george
reviewed
Nov 18, 2025
fadi-george
reviewed
Nov 20, 2025
fadi-george
reviewed
Nov 20, 2025
fadi-george
reviewed
Nov 20, 2025
fadi-george
reviewed
Nov 20, 2025
fadi-george
reviewed
Nov 20, 2025
fadi-george
reviewed
Nov 20, 2025
fadi-george
reviewed
Nov 20, 2025
fadi-george
reviewed
Nov 20, 2025
fadi-george
reviewed
Nov 20, 2025
fadi-george
reviewed
Nov 20, 2025
fadi-george
reviewed
Nov 20, 2025
fadi-george
approved these changes
Nov 21, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
1 Line Summary
Increases testing code coverage for certain modules that are labelled as low-coverage (≤50%) by vitest.
Details
Increases tests for the following:
SessionManagerAdds new test files for the following:
BellBadgeLauncherButtonDialogMessageBellLoginManagerTagManagerPromptsManagerhelpersIDManagerPermissionManagerBefore
After
Systems Affected
Validation
Tests
Info
Checklist
Programming Checklist
Interfaces:
Functions:
Typescript:
Other:
elem of arraysyntax. PreferforEachor usemapcontextif possible. Instead, we can pass it to function/constructor so that we don't callOneSignal.contextScreenshots
Info
Checklist
Related Tickets
This change is