Skip to content

Commit

Permalink
Fix: Ensure some task tests are actually running
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Mar 12, 2019
1 parent c2373f6 commit f94fd87
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions test/task.js
Expand Up @@ -111,19 +111,19 @@ describe('task', function() {
taker.task('foo', fn);
taker.task('bar', fn);

taker.series('foo', 'bar', function(cb) {
var series = taker.series('foo', 'bar', function(cb) {
expect(count).toEqual(2);
cb();
});

taker.parallel('foo', 'bar', function(cb) {
var parallel = taker.parallel('foo', 'bar', function(cb) {
setTimeout(function() {
expect(count).toEqual(4);
cb();
}, 500);
});

done();
taker.series(series, parallel)(done);
});

it('should allow composite tasks tasks to be aliased', function(done) {
Expand All @@ -143,20 +143,19 @@ describe('task', function() {
taker.task('par', taker.parallel(fn1, fn2));
taker.task('bar', taker.task('par'));

taker.series('foo', function(cb) {
var series = taker.series('foo', function(cb) {
expect(count).toEqual(3);
cb();
});

taker.series('bar', function(cb) {
var parallel = taker.series('bar', function(cb) {
setTimeout(function() {
expect(count).toEqual(6);
cb();
}, 500);

});

done();
taker.series(series, parallel)(done);
});

});

0 comments on commit f94fd87

Please sign in to comment.