Fix broken test

This commit is contained in:
Jerry Kurian 2020-01-26 10:37:59 -05:00
parent 9c09957775
commit cf719b25cf

View File

@ -355,7 +355,7 @@ test("demux() should emit one drain event when writing 6 items with highWaterMar
}); });
}); });
test.cb.only( test.cb(
"demux() should emit drain event when third stream is bottleneck", "demux() should emit drain event when third stream is bottleneck",
t => { t => {
t.plan(8); t.plan(8);
@ -446,7 +446,7 @@ test.cb(
const sink = new Writable({ const sink = new Writable({
objectMode: true, objectMode: true,
write(chunk, encoding, cb) { write(chunk, encoding, cb) {
expect(chunk.mapped).to.deep.equal([1, 2]); expect(chunk.mapped).to.deep.equal([1, 2, 3]);
t.pass(); t.pass();
pendingReads--; pendingReads--;
if (pendingReads === 0) { if (pendingReads === 0) {
@ -685,6 +685,7 @@ test.cb("Demux should remux to sink", t => {
}; };
const remux = map(d => { const remux = map(d => {
console.log(d);
t.deepEqual(d, result[i]); t.deepEqual(d, result[i]);
i++; i++;
if (i === input.length) { if (i === input.length) {