Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
writeStream.onValue(events => {
// console.log('write events %j', events)
if (++nValues === 1) {
existsSync(TMP_FILE).should.be.ok
existsSync(TMP_FILE + '.map').should.be.ok
}
else {
existsSync(TMP_FILE).should.not.be.ok
existsSync(TMP_FILE + '.map').should.not.be.ok
resolve()
return Bacon.noMore
}
})
writeStream.onError(reject)
expect(ev.value()).toStrictEqual([
[],
[
{
id: "TWO"
}
],
[
{
id: "ONE"
}
]
]);
done();
return Bacon.noMore;
});
streams.onValue(events => {
++nEvents
events.length.should.equal(1)
events[0].path.should.equal(`file${nEvents}.js`)
if (nEvents === 3) {
resolve()
return Bacon.noMore
}
})
})
getPlaylists(send, token, userId).subscribe(function(ev) {
expect(ev.hasValue()).toBeTruthy();
expect(ev.value()).toStrictEqual(_.range(0, 130));
done();
return Bacon.noMore;
});
});
p_tokens1.subscribe(function(ev) {
expect(ev.hasValue()).toBeTruthy();
expect(ev.value()).toStrictEqual([null, null]);
return Bacon.noMore;
});
}
},
{
type: "song",
song: {
id: "song2-2",
startTime: 310
}
}
]);
expect(radio4).toStrictEqual([]);
done();
return Bacon.noMore;
});
});
runner();
});
}
else {
prodObj.done();
}
}
catch (err) {
console.log('ERROR: enter transform for function (' + name +
') threw an exception (' + err + ') on input: \r\n' +
safeJSONStringify(val, null, 2));
prodObj.error(500, err);
console.log('Stack Trace: ' + err.stack);
}
if (!takeMany) {
return Bacon.noMore;
}
}, onDef.fn, onDef.name, onDef.enter, onDef.takeMany);
}
return Bacon.zipAsArray(streams).onValue(function(combo) {
callback(combo);
return Bacon.noMore;
});
}
git.getBranch("master").subscribe(function(event) {
expect(event.hasValue()).to.equal(true);
expect(event.value().name()).to.equal("refs/heads/master");
done();
return Bacon.noMore;
});
});
s_logs.subscribe(function(event) {
context.expect(event.hasValue()).toBe(true);
context.expect(event.value()).toBe("2015-01-06T18:10:37.606Z: Received signal 15; terminating.");
done();
return Bacon.noMore;
});
});