How to use asyncplify-tests - 10 common examples

To help you get started, we’ve selected a few asyncplify-tests examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github danylaporte / asyncplify / test / fromNode.js View on Github external
describe('fromNode', function () {
    asyncplify
        .fromNode(function (cb) { cb(null, 10); })
        .pipe(tests.itShouldClose())
        .pipe(tests.itShouldEndSync())
        .pipe(tests.itShouldEmitValues([10]));
});
github danylaporte / asyncplify / test / skip.js View on Github external
describe('skip', function () {
    asyncplify
        .range(5)
        .skip(2)
        .pipe(tests.itShouldClose())
        .pipe(tests.itShouldEndSync())
        .pipe(tests.itShouldEmitValues([2, 3, 4]));
});
github danylaporte / asyncplify / test / tap.js View on Github external
describe('tap', function(){
    asyncplify
        .range(3)
        .tap(function () { })
        .pipe(tests.itShouldClose())
        .pipe(tests.itShouldEndSync())
        .pipe(tests.itShouldEmitValues([0, 1, 2]));
});
github danylaporte / asyncplify / test / infinite.js View on Github external
describe('infinite', function () {
    asyncplify
        .infinite()
        .take(1)
        .pipe(tests.itShouldClose())
        .pipe(tests.itShouldEndSync())
        .pipe(tests.itShouldEmitValues([undefined]));
});
github danylaporte / asyncplify / test / filter.js View on Github external
describe('filter', function () {
    asyncplify
        .range(4)
        .filter(function (v) { return v < 2; })
        .pipe(tests.itShouldClose())
        .pipe(tests.itShouldEndSync())
        .pipe(tests.itShouldEmitValues([0, 1]));
});
github danylaporte / asyncplify / test / fromNode.js View on Github external
describe('fromNode', function () {
    asyncplify
        .fromNode(function (cb) { cb(null, 10); })
        .pipe(tests.itShouldClose())
        .pipe(tests.itShouldEndSync())
        .pipe(tests.itShouldEmitValues([10]));
});
github danylaporte / asyncplify / test / skip.js View on Github external
describe('skip', function () {
    asyncplify
        .range(5)
        .skip(2)
        .pipe(tests.itShouldClose())
        .pipe(tests.itShouldEndSync())
        .pipe(tests.itShouldEmitValues([2, 3, 4]));
});
github danylaporte / asyncplify / test / subscribeOn.js View on Github external
describe('subscribeOn', function () {
    asyncplify
        .range(3)
        .subscribeOn()
        .pipe(tests.itShouldClose())
        .pipe(tests.itShouldEndAsync())
        .pipe(tests.itShouldEmitValues([0, 1, 2]));
});
github danylaporte / asyncplify / test / tap.js View on Github external
describe('tap', function(){
    asyncplify
        .range(3)
        .tap(function () { })
        .pipe(tests.itShouldClose())
        .pipe(tests.itShouldEndSync())
        .pipe(tests.itShouldEmitValues([0, 1, 2]));
});
github danylaporte / asyncplify / test / observeOn.js View on Github external
describe('observeOn', function () {
    
    asyncplify
        .range(3)
        .observeOn()
        .pipe(tests.itShouldClose())
        .pipe(tests.itShouldEndAsync())
        .pipe(tests.itShouldEmitValues([0, 1, 2]));
});

asyncplify-tests

Common tests for asyncplify operators

MIT
Latest version published 9 years ago

Package Health Score

42 / 100
Full package analysis