• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

reactivando / use-pubsub-js / 28135979010
100%
master: 80%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 24 Jun 2026 11:22PM UTC
Jobs 1
Files 6
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Jun 2026 11:21PM UTC coverage: 100.0%. Remained the same
28135979010

push

github

web-flow
test: harden the v2 surface — property tests + gap-hunt regressions (#91)

Property-based tests (fast-check) for the bus: delivery routes only to a token's
own subscribers; an unsubscribed handler never fires; subscribeOnce fires at most
once; adversarial tokens (__proto__, constructor, '.', '') route correctly with
no prototype pollution; retained getSnapshot returns the latest value.

Regression tests from a subagent gap-hunt over the new v2 features:
- onError called once per throwing subscriber (N→N); throwing subscribeOnce
  routes through onError exactly once and isn't leaked.
- retained: per-exact-token (no spill to dotted ancestors), symbol-keyed values,
  explicit-undefined clobbers prior (documents the bus contract).
- useBusState: token change on a retained bus reads the new token's snapshot;
  an undefined payload is ignored (keeps the prior value) — and the hook now
  enforces that (skip undefined in the latest-value ref, matching its docs);
  same-tick publishes reflect only the last value.
- react19/useSubscribe parity: symbol token, multiple subscribers + by-reference
  payload, isUnsubscribe toggled back to false.

(Deliberately skipped the gap-hunt's publish-then-unmount-before-delivery cases:
the publish snapshots subscribers synchronously, so the handler fires from the
snapshot regardless — that's bus-level behavior, already tested there.)

devDep: fast-check. 141 tests, 100% coverage, lint clean, e2e 12/12, attw + publint clean.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

32 of 32 branches covered (100.0%)

Branch coverage included in aggregate %.

2 of 2 new or added lines in 1 file covered. (100.0%)

212 of 212 relevant lines covered (100.0%)

185.25 hits per line

Jobs
ID Job ID Ran Files Coverage
1 28135979010.1 24 Jun 2026 11:21PM UTC 6
100.0
GitHub Action Run
Source Files on build 28135979010
  • Tree
  • List 6
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #28135979010
  • 6a998e13 on github
  • Prev Build on main (#28134670410)
  • Next Build on main (#28136139560)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc