Update test

This commit is contained in:
Jerry Kurian 2020-04-27 14:23:58 -04:00
parent d0a9d35fe7
commit 5dd856deed

View File

@ -864,17 +864,14 @@ test.cb("demux() should be 'destroyable'", t => {
}); });
test.cb("Should delete idle pipelines", t => { test.cb("Should delete idle pipelines", t => {
t.plan(6); t.plan(5);
const input = [ const input = [
{ key: "a", visited: [] }, { key: "a", visited: [] },
{ key: "b", visited: [] }, { key: "b", visited: [] },
{ key: "b", visited: [] }, { key: "b", visited: [] },
{ key: "a", visited: [] }, { key: "a", visited: [] },
{ key: "c", visited: [] },
{ key: "c", visited: [] },
{ key: "c", visited: [] },
{ key: "b", visited: [] }, { key: "b", visited: [] },
{ key: "d", visited: [] }, { key: "c", visited: [] },
]; ];
const construct = sinon.spy((destKey: string) => { const construct = sinon.spy((destKey: string) => {
const dest = map((chunk: Test) => { const dest = map((chunk: Test) => {
@ -892,7 +889,7 @@ test.cb("Should delete idle pipelines", t => {
}); });
demuxed.on("data", data => { demuxed.on("data", data => {
if (data.key === "d") t.end(); if (data.key === "c") t.end();
}); });
for (let i = 0; i < input.length; i++) { for (let i = 0; i < input.length; i++) {