Skip to content

ipc-bridge-analyzer.ts is at 55.81% branch coverage #55

Description

@antelm-dev

What happens

Per-file coverage on main:

File % Branch
src/bridge/ipc-bridge-analyzer.ts 55.81
src/shared/utils.ts 73.33
src/shared/ts-utils.ts 77.58
src/runtime/ipc-container.ts 80.43
src/bridge/ipc-bridge-generator.ts 95.45
src/runtime/ipc-module.ts 95.94

The analyzer is the weakest file by a wide margin, and it holds the project average down.

Why it matters more now than it did

Pre-1.0 this was a quality gap. Post-1.0 the analyzer's behaviour is the contract — the bridge it emits is the renderer's public API, and the stability contract covers "generated bridge method names and types". A wrong bridge is now a breaking change delivered by accident.

The uncovered branches are the malformed- and unusual-input paths in the AST walk: non-literal prefixes, channels whose callbacks have no call signatures, __-prefixed keys, spread channel objects, and the eventPrefix extraction cases.

Shape of the work

These need fixture *.ipc.ts files rather than unit assertions — the existing test/fixtures/analyzer/ layout already supports this, and extractModules(program, dir) can be pointed at a sibling directory so one bad fixture does not break every other analyzer test (see test/fixtures/analyzer/multi/ for the pattern).

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions