Skip to content

Commit

Permalink
Update: Add tests for taking an array as only argument to series/para…
Browse files Browse the repository at this point in the history
…llel (closes #73) (#74)
  • Loading branch information
Anshil Bhansali authored and phated committed Feb 25, 2017
1 parent ffcb044 commit 36e0b2e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/parallel.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ describe('parallel', function() {
done();
});

it('should take only one array of registered tasks', function(done) {
taker.series(['test1', 'test2', 'test3'])(function(err, results) {
expect(results).toEqual([1, 2, 3]);
done(err);
});
});

it('should take all string names', function(done) {
taker.parallel('test1', 'test2', 'test3')(function(err, results) {
expect(results).toEqual([1, 2, 3]);
Expand Down
7 changes: 7 additions & 0 deletions test/series.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ describe('series', function() {
done();
});

it('should take only one array of registered tasks', function(done) {
taker.series(['test1', 'test2', 'test3'])(function(err, results) {
expect(results).toEqual([1, 2, 3]);
done(err);
});
});

it('should take all string names', function(done) {
taker.series('test1', 'test2', 'test3')(function(err, results) {
expect(results).toEqual([1, 2, 3]);
Expand Down

0 comments on commit 36e0b2e

Please sign in to comment.