Skip to content

Commit

Permalink
chore: fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed Mar 11, 2020
1 parent 3d6d21a commit 0a24bb9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,13 @@ describe('callbackify', () => {
const error = new Error('err');
const callback = sinon.stub().throws(error);
const originalRejection = process.listeners('unhandledRejection').pop();
if (originalRejection) process.removeListener('unhandledRejection', originalRejection!);
if (originalRejection)
process.removeListener('unhandledRejection', originalRejection!);
process.once('unhandledRejection', err => {
assert.strictEqual(error, err);
assert.ok(callback.calledOnce);
if (originalRejection) process.listeners('unhandledRejection').push(originalRejection!);
if (originalRejection)
process.listeners('unhandledRejection').push(originalRejection!);
});
func(callback);
});
Expand Down

0 comments on commit 0a24bb9

Please sign in to comment.