Browse Source

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>
v5.x
Rich Trott 9 years ago
parent
commit
c78091d689
  1. 1
      test/addons/async-hello-world/test.js
  2. 1
      test/addons/at-exit/test.js
  3. 2
      test/addons/heap-profiler/test.js
  4. 1
      test/addons/hello-world-function-export/test.js
  5. 1
      test/addons/hello-world/test.js
  6. 1
      test/addons/repl-domain-abort/test.js
  7. 1
      test/debugger/test-debugger-repl-break-in-module.js
  8. 1
      test/debugger/test-debugger-repl-restart.js
  9. 1
      test/debugger/test-debugger-repl-term.js
  10. 1
      test/debugger/test-debugger-repl.js

1
test/addons/async-hello-world/test.js

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

1
test/addons/at-exit/test.js

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

2
test/addons/heap-profiler/test.js

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

1
test/addons/hello-world-function-export/test.js

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

1
test/addons/hello-world/test.js

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

1
test/addons/repl-domain-abort/test.js

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

1
test/debugger/test-debugger-repl-break-in-module.js

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

1
test/debugger/test-debugger-repl-restart.js

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

1
test/debugger/test-debugger-repl-term.js

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

1
test/debugger/test-debugger-repl.js

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

Loading…
Cancel
Save