mirror of
https://github.com/nodejs/node.git
synced 2025-05-17 18:26:24 +00:00

common.js contains code that detects leaked variables. In preparation for an eslint rule that will enforce loading common.js in test files, load it everywhere it can be loaded and use an `eslint-disable` comment for files that intentionally leak. PR-URL: https://github.com/nodejs/node/pull/3157 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
18 lines
342 B
JavaScript
18 lines
342 B
JavaScript
'use strict';
|
|
require('../../common');
|
|
var assert = require('assert');
|
|
var binding = require('./build/Release/binding');
|
|
var called = false;
|
|
|
|
process.on('exit', function() {
|
|
assert(called);
|
|
});
|
|
|
|
binding(5, function(err, val) {
|
|
assert.equal(null, err);
|
|
assert.equal(10, val);
|
|
process.nextTick(function() {
|
|
called = true;
|
|
});
|
|
});
|