Skip to content

danylaporte/asyncplify-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

asyncplify-tests

Common tests for asyncplify operators

Installation

npm install asyncplify-tests

Execute 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]));
});

Documentation

itShouldClose

Test if the source support closing during iteration.

asyncplify
	.fromArray([0, 1])
	.pipe(tests.itShouldClose());

itShouldEmitValues

Test if the source emit the specified values.

asyncplify
	.fromArray([0, 1])
	.pipe(tests.itShouldEmitValues([0, 1]));

itShouldEndAsync

Test if the source end asynchronously.

asyncplify
	.fromArray([0, 1])
	.pipe(tests.itShouldEndAsync());
// Not OK! fromArray is synchronous

itShouldEndSync

Test if the source end synchronously.

asyncplify
	.fromArray([0, 1])
	.pipe(tests.itShouldEndSync());

License

The MIT License (MIT)

Copyright (c) 2015 Dany Laporte

About

Common tests for asyncplify operators

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages