Common tests for asyncplify operators
npm install asyncplify-testsExecute tests on a asyncplify source
var tests = require('asyncplify-tests');
describe('fromArray' function () {
asyncplify
.fromArray([0, 1])
.pipe(tests.itShouldClose())
.pipe(tests.itShouldEndSync())
.pipe(tests.itShouldEmitValues([0, 1]));
});Test if the source support closing during iteration.
asyncplify
.fromArray([0, 1])
.pipe(tests.itShouldClose());Test if the source emit the specified values.
asyncplify
.fromArray([0, 1])
.pipe(tests.itShouldEmitValues([0, 1]));Test if the source end asynchronously.
asyncplify
.fromArray([0, 1])
.pipe(tests.itShouldEndAsync());
// Not OK! fromArray is synchronousTest if the source end synchronously.
asyncplify
.fromArray([0, 1])
.pipe(tests.itShouldEndSync());The MIT License (MIT)
Copyright (c) 2015 Dany Laporte