0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 15:06:33 +01:00

test: load common.js in all tests

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>
This commit is contained in:
Rich Trott 2015-10-01 21:37:12 -07:00
parent dbce29a3ac
commit c78091d689
10 changed files with 11 additions and 0 deletions

View File

@ -1,4 +1,5 @@
'use strict';
require('../../common');
var assert = require('assert');
var binding = require('./build/Release/binding');
var called = false;

View File

@ -1,2 +1,3 @@
'use strict';
require('../../common');
var binding = require('./build/Release/binding');

View File

@ -1,5 +1,7 @@
'use strict';
require('../../common');
const binding = require('./build/Release/binding');
// Create an AsyncWrap object.

View File

@ -1,4 +1,5 @@
'use strict';
require('../../common');
var assert = require('assert');
var binding = require('./build/Release/binding');
assert.equal('world', binding());

View File

@ -1,4 +1,5 @@
'use strict';
require('../../common');
var assert = require('assert');
var binding = require('./build/Release/binding');
assert.equal('world', binding.hello());

View File

@ -1,4 +1,5 @@
'use strict';
require('../../common');
var assert = require('assert');
var repl = require('repl');
var stream = require('stream');

View File

@ -1,4 +1,5 @@
'use strict';
require('../common');
var repl = require('./helper-debugger-repl.js');
repl.startDebugger('break-in-module/main.js');

View File

@ -1,4 +1,5 @@
'use strict';
require('../common');
var repl = require('./helper-debugger-repl.js');
repl.startDebugger('breakpoints.js');

View File

@ -1,4 +1,5 @@
'use strict';
require('../common');
process.env.NODE_FORCE_READLINE = 1;
var repl = require('./helper-debugger-repl.js');

View File

@ -1,4 +1,5 @@
'use strict';
require('../common');
var repl = require('./helper-debugger-repl.js');
repl.startDebugger('breakpoints.js');