@siglo/testing 1.0.0 → 1.0.3
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 +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -58,7 +58,7 @@ harness.mockStep('callStripe', async (param) => {
|
|
|
58
58
|
|
|
59
59
|
## 4. Fake Clock & Virtual Timers
|
|
60
60
|
|
|
61
|
-
Control virtual
|
|
61
|
+
Control virtual timestamps for harness trace records without `setTimeout` delays in tests. Note that `FakeClock` advances its own timestamp counter and `tick()` flushes pending microtasks via `setImmediate`; it does not mock Node's global `Date.now` or `setTimeout`.
|
|
62
62
|
|
|
63
63
|
```typescript
|
|
64
64
|
import { FakeClock, createWorkflowHarness } from '@siglo/testing';
|
|
@@ -66,7 +66,7 @@ import { FakeClock, createWorkflowHarness } from '@siglo/testing';
|
|
|
66
66
|
const clock = new FakeClock(1000);
|
|
67
67
|
const harness = createWorkflowHarness(workflow, { clock });
|
|
68
68
|
|
|
69
|
-
// Advance virtual clock
|
|
69
|
+
// Advance virtual clock timestamp
|
|
70
70
|
clock.advanceTime(5000);
|
|
71
71
|
|
|
72
72
|
// Advance virtual clock and flush microtask loop
|
|
@@ -187,4 +187,4 @@ describe('Full Harness Suite', () => {
|
|
|
187
187
|
## API Reference Links
|
|
188
188
|
|
|
189
189
|
- [TypeScript Reference](../../docs/10-typescript-reference.md)
|
|
190
|
-
- [CLI Reference](../../docs/
|
|
190
|
+
- [CLI Reference](../../docs/adapters/cli.md)
|
package/package.json
CHANGED