Skip to content

Commit

Permalink
even moar coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
aearly committed Jun 23, 2019
1 parent c52c887 commit 915c504
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/nextTick.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';

/* istanbul ignore file */
import { hasNextTick, hasSetImmediate, fallback, wrap } from './internal/setImmediate';

/**
Expand Down
22 changes: 22 additions & 0 deletions test/whilst.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,28 @@ describe('whilst', () => {
);
});

it('errors', (done) => {
async.whilst(
cb => cb(new Error('bad test')),
cb => cb(),
err => {
expect(err.message).to.equal('bad test')
done()
}
)
})

it('errors (iteratee)', (done) => {
async.whilst(
cb => cb(null, true),
cb => cb(new Error('bad iter')),
err => {
expect(err.message).to.equal('bad iter')
done()
}
)
})

it('whilst optional callback', (done) => {
var counter = 0;
async.whilst(
Expand Down

0 comments on commit 915c504

Please sign in to comment.