Wildcard before typed
Wildcard subscribers receive the type and run before typed subscribers.
Expected: wildcard → typed
Mutation scenarios
Each scenario creates a fresh emitter, runs real module code, and compares the actual sequence with the documented sequence. No editable JavaScript or evaluation is involved.
Wildcard subscribers receive the type and run before typed subscribers.
Expected: wildcard → typed
The once record disappears before its handler publishes the same type again.
Expected: once → persistent:nested → persistent:outer
The active registration array is live, so each newly appended handler can run in that emit.
Expected: first → second → late → first → second → late → late
A handler removed by an earlier peer is skipped immediately.
Expected: first
Reset replaces the registry. The active wildcard array finishes, then the old typed bucket is no longer found.
Expected: wildcard-reset → late-wildcard
A synchronous handler error propagates and stops later handlers.
Expected: first → caught:expected
The page resolves the same bare package names through an import map. For an installed app, put this map before the first module script and serve the mapped files over HTTP(S):
<script type="importmap">
{"imports":{"event-pubsub":"./node_modules/event-pubsub/index.js","strong-type":"./node_modules/strong-type/index.js"}}
</script>If the app uses a strict CSP, authorize the inline import-map script with an allowed nonce or hash.