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 23, 2020
1 parent 0a24bb9 commit 75208dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions samples/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ const {assert} = require('chai');
const {describe, it} = require('mocha');
const cp = require('child_process');

const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
const execSync = (cmd) => cp.execSync(cmd, {encoding: 'utf-8'});

describe('quickstart samples', () => {
it('should run the quickstart', async () => {
const stdout = execSync('node quickstart.js');
assert.include(stdout, 'Well hello there, nodestronaut!');
});
});

6 changes: 4 additions & 2 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,13 +370,15 @@ describe('callbackify', () => {
const error = new Error('err');
const callback = sinon.stub().throws(error);
const originalRejection = process.listeners('unhandledRejection').pop();
if (originalRejection)
if (originalRejection) {
process.removeListener('unhandledRejection', originalRejection!);
}
process.once('unhandledRejection', err => {
assert.strictEqual(error, err);
assert.ok(callback.calledOnce);
if (originalRejection)
if (originalRejection) {
process.listeners('unhandledRejection').push(originalRejection!);
}
});
func(callback);
});
Expand Down

0 comments on commit 75208dc

Please sign in to comment.