Skip to content

test: add API, type and wire-protocol safety nets - #45

Merged
fateeand merged 3 commits into
mainfrom
split/1-tests
Nov 13, 2026
Merged

fateeand merged 3 commits into
mainfrom
split/1-tests

Conversation

@fateeand

@fateeand fateeand commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Part 1 of 8 of the split of #34 (the framework-independent core). It adds safety nets for the Angular package as it is today, and changes none of its source.

Changes

  • Public API snapshot (public-api.snapshot.json, scripts/api-snapshot.mjs, npm run api:check): fails CI when an exported name, signature or type changes unintentionally.
  • Type tests (type-tests/): the typed-names registry augmented and empty, and compatibility of the public types.
  • Broadcast wire test (uwt-broadcast.wire.spec.ts plus a recorded fixture): a shell and a fragment exchange every message, and the fixture pins what goes over the channel. The later parts of this series must not change it. Stack traces and times are compared by type, so it passes on any machine.
  • CI step for api:check, README note.

How to review

No production code changes. Everything is a test, a fixture or a script.

Closes #37

Part 1 of 8 of the epic #35. Stack on GitHub, merged bottom first:

  1. test: add API, type and wire-protocol safety nets #45 Safety nets (this PR)
  2. build: add the framework-independent core package #46 Scaffold the core
  3. refactor: move models, redaction and scenarios into the core #47 Move models, redaction and scenarios
  4. refactor: add the framework-independent telemetry engine #48 Telemetry engine
  5. refactor: move the shell/fragment broadcast protocol into the core #49 Broadcast protocol
  6. refactor: move the AWS RUM sink into the core's rum entry point #50 RUM sink
  7. test: smoke-test the packed packages in real consumers #51 Smoke tests
  8. feat: release and publish both packages independently, with docs and logos #52 Release, docs and logos

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Coverage report

St.❔
Category Percentage Covered / Total
🟢 Statements
94.31% (-2.83% 🔻)
1393/1477
🟢 Branches
95.55% (+0.12% 🔼)
795/832
🟢 Functions
95.7% (-1.39% 🔻)
334/349
🟢 Lines
94.53% (-2.94% 🔻)
1349/1427
Show new covered files 🐣
St.❔
File Statements Branches Functions Lines
🔴
... / empty-registry.ts
0% 100% 0% 0%
🔴
... / augmented.ts
0% 100% 0% 0%

Test suite run success

787 tests passing in 25 suites.

Report generated by 🧪jest coverage report action from 0c4ff53

Comment thread package.json Outdated
"format": "prettier --write \"**/*.{ts,mjs,html}\"",
"format:check": "prettier --check \"**/*.{ts,mjs,html}\"",
"typecheck": "tsc -p projects/ngx-ui-watchtower/tsconfig.lib.json --noEmit && tsc -p projects/ngx-ui-watchtower/tsconfig.spec.json --noEmit && tsc -p projects/ngx-ui-watchtower/rum/tsconfig.lib.json --noEmit && tsc -p projects/ngx-ui-watchtower/rum/tsconfig.spec.json --noEmit && ngc -p projects/ngx-ui-watchtower/type-tests/tsconfig.json && ngc -p projects/ngx-ui-watchtower/type-tests/tsconfig.augmented.json",
"api:check": "node scripts/api-snapshot.mjs",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit (optional): api:check doesn't rebuild, so locally it can pass against a stale dist/ (CI is fine since it builds first). Running the build inside api:check would avoid a surprise CI failure.

@fateeand fateeand Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks! api:check builds first now (same for api:update)

@TerranceKhumalo-absa TerranceKhumalo-absa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

Comment thread scripts/api-snapshot.mjs Resolved
@fateeand
fateeand merged commit 52c5a99 into main Nov 13, 2026
9 checks passed
@fateeand
fateeand deleted the split/1-tests branch November 13, 2026 07:57
fateeand added a commit that referenced this pull request Nov 13, 2026
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.

Add API, type and wire-protocol safety nets for the Angular package

3 participants