node/test/parallel/test-timer-close.js
Gibson Fahnestock 6f85c81f0d
test: s/assert.equal/assert.strictEqual/
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>
2017-04-18 20:01:52 -04:00

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);
});