Skip to content

[SDK-518] - Increase test coverage#880

Open
jferrao-itrbl wants to merge 4 commits into
masterfrom
feature/SDK-518-increase-test-coverage
Open

[SDK-518] - Increase test coverage#880
jferrao-itrbl wants to merge 4 commits into
masterfrom
feature/SDK-518-increase-test-coverage

Conversation

@jferrao-itrbl

@jferrao-itrbl jferrao-itrbl commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

🔹 JIRA Ticket(s) if any

✏️ Description

  • Increate unit test coverage on core SDK surface.
  • Add mechanical coverage ratchet for models, enums and utils.

Aggregate coverage: 70.95% statements | 60.55% branch | 66.4% functions | 71.02% lines

   - 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
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Lines Statements Branches Functions
Coverage: 71%
71.07% (538/757) 60.55% (218/360) 66.66% (170/255)

@qltysh

qltysh Bot commented Jun 30, 2026

Copy link
Copy Markdown

Qlty


⚠️ Comments skipped @jferrao-itrbl doesn't have a Qlty seat in Iterable.

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.

@joaodordio joaodordio marked this pull request as ready for review June 30, 2026 18:36
expect(manager.isEnabled).toBe(false);
});

it('should keep isEnabled false when constructed with enableEmbeddedMessaging === false and not call native sync', () => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

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.

2 participants