Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
describe('fromNode', function () {
asyncplify
.fromNode(function (cb) { cb(null, 10); })
.pipe(tests.itShouldClose())
.pipe(tests.itShouldEndSync())
.pipe(tests.itShouldEmitValues([10]));
});
describe('skip', function () {
asyncplify
.range(5)
.skip(2)
.pipe(tests.itShouldClose())
.pipe(tests.itShouldEndSync())
.pipe(tests.itShouldEmitValues([2, 3, 4]));
});
describe('subscribeOn', function () {
asyncplify
.range(3)
.subscribeOn()
.pipe(tests.itShouldClose())
.pipe(tests.itShouldEndAsync())
.pipe(tests.itShouldEmitValues([0, 1, 2]));
});
describe('tap', function(){
asyncplify
.range(3)
.tap(function () { })
.pipe(tests.itShouldClose())
.pipe(tests.itShouldEndSync())
.pipe(tests.itShouldEmitValues([0, 1, 2]));
});
describe('observeOn', function () {
asyncplify
.range(3)
.observeOn()
.pipe(tests.itShouldClose())
.pipe(tests.itShouldEndAsync())
.pipe(tests.itShouldEmitValues([0, 1, 2]));
});