Use assert.strictEqual instead of assert.equal in tests, manually convert types where necessary. Backport-PR-URL: https://github.com/nodejs/node/pull/11795 PR-URL: https://github.com/nodejs/node/pull/10698 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
16 lines
284 B
JavaScript
16 lines
284 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const assert = require('assert');
|
|
|
|
const t = new (process.binding('timer_wrap').Timer)();
|
|
let called = 0;
|
|
function onclose() {
|
|
called++;
|
|
}
|
|
|
|
t.close(onclose);
|
|
t.close(onclose);
|
|
|
|
process.on('exit', function() {
|
|
assert.strictEqual(1, called);
|
|
});
|