@relaybus/testing 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/index.cjs +1266 -1187
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -6
- package/dist/index.d.ts +19 -6
- package/dist/index.js +1266 -1187
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -49,6 +49,11 @@ clock.advance(60_000); // make retries due
|
|
|
49
49
|
await bus.drain();
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
+
Timers (polling, heartbeats, handler timeouts, retention) stay real by default. With
|
|
53
|
+
`new FakeClock(start, { controlTimers: true })` the clock owns the timers of the bus that uses it:
|
|
54
|
+
they run inside `clock.advance(ms)` when their time comes, and `clock.pendingTimers` counts the ones
|
|
55
|
+
still waiting. Any `Clock` can do the same by implementing the optional `schedule` method.
|
|
56
|
+
|
|
52
57
|
## InMemoryTransport
|
|
53
58
|
|
|
54
59
|
Records publishes, simulates outages with `failNextPublishes(n)` and delivers
|