collectingSink
function collectingSink<T>(options?): CollectingSink<T>;Defined in: src/testing/index.ts:81
Create a CollectingSink.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? |
CollectingSinkOptions |
Returns
Section titled “Returns”Example
Section titled “Example”const sink = collectingSink<AuditEvent>();const stream = { kind: "collecting", send: (batch) => sink.push(...batch.events) };sink.failNext(2); // the next two sends reject