diff --git a/src/functions/index.ts b/src/functions/index.ts index ac53414..81c065b 100644 --- a/src/functions/index.ts +++ b/src/functions/index.ts @@ -28,7 +28,7 @@ import { unbatch } from "./unbatch"; import { compose } from "./compose"; import { demux } from "./demux"; -export function strom(defaultOptions?: TransformOptions) { +export function strom(defaultOptions: TransformOptions = { objectMode: true }) { function withDefaultOptions( n: number, fn: (...args: T) => R, diff --git a/tests/collect.spec.ts b/tests/collect.spec.ts index 122ff51..5af912d 100644 --- a/tests/collect.spec.ts +++ b/tests/collect.spec.ts @@ -59,7 +59,7 @@ test.cb( const source = new Readable({ objectMode: false }); source - .pipe(collect()) + .pipe(collect({ objectMode: false })) .on("data", collected => { expect(collected).to.deep.equal(Buffer.from("abc")); t.pass(); diff --git a/tests/concat.spec.ts b/tests/concat.spec.ts index d77d441..8f4bf7b 100644 --- a/tests/concat.spec.ts +++ b/tests/concat.spec.ts @@ -172,7 +172,7 @@ test.cb( test.cb("concat() concatenates empty list of readable streams", t => { t.plan(0); concat() - .pipe(collect()) + .pipe(collect({ objectMode: false })) .on("data", _ => { t.fail(); })