Browse Source

test: fixup parallel/test-async-wrap-post-did-throw.js

* change var to let
* replace equal with strictEqual

PR-URL: https://github.com/nodejs/node/pull/8625
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
v6.x
Jermaine Oppong 8 years ago
committed by Jeremiah Senkpiel
parent
commit
1b494d3b96
  1. 10
      test/parallel/test-async-wrap-post-did-throw.js

10
test/parallel/test-async-wrap-post-did-throw.js

@ -3,17 +3,17 @@
require('../common');
const assert = require('assert');
const async_wrap = process.binding('async_wrap');
var asyncThrows = 0;
var uncaughtExceptionCount = 0;
let asyncThrows = 0;
let uncaughtExceptionCount = 0;
process.on('uncaughtException', (e) => {
assert.equal(e.message, 'oh noes!', 'error messages do not match');
assert.strictEqual(e.message, 'oh noes!', 'error messages do not match');
});
process.on('exit', () => {
process.removeAllListeners('uncaughtException');
assert.equal(uncaughtExceptionCount, 1);
assert.equal(uncaughtExceptionCount, asyncThrows);
assert.strictEqual(uncaughtExceptionCount, 1);
assert.strictEqual(uncaughtExceptionCount, asyncThrows);
});
function init() { }

Loading…
Cancel
Save