[SDK-518] - Increase test coverage#880
Conversation
- Replace placeholder root test with public surface export checks - Add event-handler wiring/dedup and platform URL-handler tests for Iterable.ts - Add bridge proxy tests for initialization and embedded messaging in IterableApi.ts - Add auth handler tests for string/null/undefined/timeout resolution paths - Raise Jest coverage thresholds for core touched files
|
Qlty doesn't post analysis or coverage comments for contributors without a seat. An authorized user can grant @jferrao-itrbl a seat from this pull request's page in Qlty. |
| expect(manager.isEnabled).toBe(false); | ||
| }); | ||
|
|
||
| it('should keep isEnabled false when constructed with enableEmbeddedMessaging === false and not call native sync', () => { |
There was a problem hiding this comment.
Nit: the test title ...and not call native sync reads at first glance like the assertion should be not.toHaveBeenCalled(). The body and toHaveBeenCalledTimes(1) actually prove "constructor does not auto-call native sync, explicit syncMessages() still proxies through", which is fine, but the name buries that.
Consider either:
- Renaming to something like
constructor with enableEmbeddedMessaging=false does not auto-call native sync, and explicit syncMessages still proxies through, or - Splitting into two tests, one for the constructor invariant and one for the proxy behavior.
Optional bonus: add an explicit expect(MockRNIterableAPI.syncEmbeddedMessages).not.toHaveBeenCalled() between new IterableEmbeddedManager(...) and manager.syncMessages() to pin down the constructor-no-auto-sync invariant independently of the proxy call count.

🔹 JIRA Ticket(s) if any
✏️ Description
Aggregate coverage: 70.95% statements | 60.55% branch | 66.4% functions | 71.02% lines