mirror of
https://github.com/nodejs/node.git
synced 2025-05-05 15:32:15 +00:00

PR-URL: https://github.com/nodejs/node/pull/8478 Reviewed-By: James M Snell <jasnell@gmail.com>
17 lines
274 B
JavaScript
17 lines
274 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);
|
|
});
|