Skip to content

Commit

Permalink
[squash] add unhandled rejection handler to dns tests
Browse files Browse the repository at this point in the history
  • Loading branch information
addaleax committed Apr 18, 2017
1 parent d4ddf2a commit e58940a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/internet/test-dns-ipv4.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ const net = require('net');
const util = require('util');
const isIPv4 = net.isIPv4;

// Crash the process on unhandled rejections.
process.on('unhandledRejection', (err) => setImmediate(() => { throw err; }));

let running = false;
const queue = [];

Expand Down
3 changes: 3 additions & 0 deletions test/internet/test-dns.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ const isIPv4 = net.isIPv4;
const isIPv6 = net.isIPv6;
const util = require('util');

// Crash the process on unhandled rejections.
process.on('unhandledRejection', (err) => setImmediate(() => { throw err; }));

let expected = 0;
let completed = 0;
let running = false;
Expand Down

0 comments on commit e58940a

Please sign in to comment.