mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
02fe8215f0
common.js contains code that checks for variables leaking into the global namespace. Load common.js in all tests that do not intentionally leak variables. PR-URL: https://github.com/nodejs/node/pull/3095 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
17 lines
272 B
JavaScript
17 lines
272 B
JavaScript
'use strict';
|
|
require('../common');
|
|
var assert = require('assert');
|
|
|
|
var t = new (process.binding('timer_wrap').Timer);
|
|
var called = 0;
|
|
function onclose() {
|
|
called++;
|
|
}
|
|
|
|
t.close(onclose);
|
|
t.close(onclose);
|
|
|
|
process.on('exit', function() {
|
|
assert.equal(1, called);
|
|
});
|