Browse Source

test: load common.js to test for global leaks

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>
v5.x
Rich Trott 9 years ago
parent
commit
02fe8215f0
  1. 1
      test/parallel/test-arm-math-exp-regress-1376.js
  2. 1
      test/parallel/test-bad-unicode.js
  3. 1
      test/parallel/test-beforeexit-event-exit.js
  4. 1
      test/parallel/test-child-process-fork-exec-argv.js
  5. 1
      test/parallel/test-cluster-disconnect-before-exit.js
  6. 1
      test/parallel/test-cluster-disconnect-unshared-tcp.js
  7. 1
      test/parallel/test-cluster-disconnect-with-no-workers.js
  8. 1
      test/parallel/test-cluster-worker-events.js
  9. 1
      test/parallel/test-cluster-worker-forced-exit.js
  10. 1
      test/parallel/test-cluster-worker-isconnected.js
  11. 1
      test/parallel/test-cluster-worker-isdead.js
  12. 1
      test/parallel/test-domain-enter-exit.js
  13. 1
      test/parallel/test-domain-nested.js
  14. 1
      test/parallel/test-domain-safe-exit.js
  15. 1
      test/parallel/test-event-emitter-errors.js
  16. 1
      test/parallel/test-freelist.js
  17. 1
      test/parallel/test-http-client-read-in-error.js
  18. 1
      test/parallel/test-next-tick-doesnt-hang.js
  19. 1
      test/parallel/test-path-parse-format.js
  20. 1
      test/parallel/test-process-argv-0.js
  21. 1
      test/parallel/test-process-binding.js
  22. 1
      test/parallel/test-process-exec-argv.js
  23. 1
      test/parallel/test-process-exit-recursive.js
  24. 1
      test/parallel/test-readline-interface.js
  25. 1
      test/parallel/test-readline-keys.js
  26. 1
      test/parallel/test-readline-set-raw-mode.js
  27. 1
      test/parallel/test-readline-undefined-columns.js
  28. 1
      test/parallel/test-regress-GH-4256.js
  29. 1
      test/parallel/test-regress-GH-5927.js
  30. 1
      test/parallel/test-regress-GH-io-1068.js
  31. 1
      test/parallel/test-regress-GH-io-1811.js
  32. 1
      test/parallel/test-regress-GH-node-9326.js
  33. 1
      test/parallel/test-repl-tab.js
  34. 1
      test/parallel/test-require-json.js
  35. 1
      test/parallel/test-require-process.js
  36. 1
      test/parallel/test-stdin-pause-resume-sync.js
  37. 1
      test/parallel/test-stdin-pause-resume.js
  38. 1
      test/parallel/test-stdin-resume-pause.js
  39. 1
      test/parallel/test-string-decoder-end.js
  40. 1
      test/parallel/test-sync-io-option.js
  41. 1
      test/parallel/test-timer-close.js
  42. 1
      test/parallel/test-timers-non-integer-delay.js
  43. 1
      test/parallel/test-timers-this.js
  44. 1
      test/parallel/test-timers-unref-leak.js
  45. 1
      test/parallel/test-timers-unrefd-interval-still-fires.js
  46. 1
      test/parallel/test-util-log.js
  47. 1
      test/sequential/test-cluster-listening-port.js
  48. 1
      test/sequential/test-vm-timeout-rethrow.js

1
test/parallel/test-arm-math-exp-regress-1376.js

@ -2,6 +2,7 @@
// See https://github.com/nodejs/node/issues/1376
// and https://code.google.com/p/v8/issues/detail?id=4019
require('../common');
Math.abs(-0.5);
Math.acos(-0.5);
Math.acosh(-0.5);

1
test/parallel/test-bad-unicode.js

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

1
test/parallel/test-beforeexit-event-exit.js

@ -1,4 +1,5 @@
'use strict';
require('../common');
var assert = require('assert');
process.on('beforeExit', function() {

1
test/parallel/test-child-process-fork-exec-argv.js

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

1
test/parallel/test-cluster-disconnect-before-exit.js

@ -1,4 +1,5 @@
'use strict';
require('../common');
var cluster = require('cluster');
if (cluster.isMaster) {

1
test/parallel/test-cluster-disconnect-unshared-tcp.js

@ -1,4 +1,5 @@
'use strict';
require('../common');
process.env.NODE_CLUSTER_SCHED_POLICY = 'none';
var cluster = require('cluster');

1
test/parallel/test-cluster-disconnect-with-no-workers.js

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

1
test/parallel/test-cluster-worker-events.js

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

1
test/parallel/test-cluster-worker-forced-exit.js

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

1
test/parallel/test-cluster-worker-isconnected.js

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

1
test/parallel/test-cluster-worker-isdead.js

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

1
test/parallel/test-domain-enter-exit.js

@ -1,6 +1,7 @@
'use strict';
// Make sure the domain stack is a stack
require('../common');
var assert = require('assert');
var domain = require('domain');

1
test/parallel/test-domain-nested.js

@ -1,6 +1,7 @@
'use strict';
// Make sure that the nested domains don't cause the domain stack to grow
require('../common');
var assert = require('assert');
var domain = require('domain');

1
test/parallel/test-domain-safe-exit.js

@ -1,6 +1,7 @@
'use strict';
// Make sure the domain stack doesn't get clobbered by un-matched .exit()
require('../common');
var assert = require('assert');
var domain = require('domain');

1
test/parallel/test-event-emitter-errors.js

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

1
test/parallel/test-freelist.js

@ -2,6 +2,7 @@
// Flags: --expose-internals
require('../common');
const assert = require('assert');
const freelist = require('freelist');
const internalFreelist = require('internal/freelist');

1
test/parallel/test-http-client-read-in-error.js

@ -1,4 +1,5 @@
'use strict';
require('../common');
var net = require('net');
var http = require('http');
var util = require('util');

1
test/parallel/test-next-tick-doesnt-hang.js

@ -4,6 +4,7 @@
* does not hang the event loop. If this test times out it has failed.
*/
require('../common');
process.nextTick(function() {
// Nothing
});

1
test/parallel/test-path-parse-format.js

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

1
test/parallel/test-process-argv-0.js

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

1
test/parallel/test-process-binding.js

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

1
test/parallel/test-process-exec-argv.js

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

1
test/parallel/test-process-exit-recursive.js

@ -1,4 +1,5 @@
'use strict';
require('../common');
var assert = require('assert');
// recursively calling .exit() should not overflow the call stack

1
test/parallel/test-readline-interface.js

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

1
test/parallel/test-readline-keys.js

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

1
test/parallel/test-readline-set-raw-mode.js

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

1
test/parallel/test-readline-undefined-columns.js

@ -1,5 +1,6 @@
'use strict';
require('../common');
const assert = require('assert');
const PassThrough = require('stream').PassThrough;
const readline = require('readline');

1
test/parallel/test-regress-GH-4256.js

@ -1,4 +1,5 @@
'use strict';
require('../common');
process.domain = null;
var timer = setTimeout(function() {
console.log('this console.log statement should not make node crash');

1
test/parallel/test-regress-GH-5927.js

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

1
test/parallel/test-regress-GH-io-1068.js

@ -1,2 +1,3 @@
'use strict';
require('../common');
process.stdin.emit('end');

1
test/parallel/test-regress-GH-io-1811.js

@ -1,5 +1,6 @@
'use strict';
require('../common');
const assert = require('assert');
// Change kMaxLength for zlib to trigger the error without having to allocate

1
test/parallel/test-regress-GH-node-9326.js

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

1
test/parallel/test-repl-tab.js

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

1
test/parallel/test-require-json.js

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

1
test/parallel/test-require-process.js

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

1
test/parallel/test-stdin-pause-resume-sync.js

@ -1,4 +1,5 @@
'use strict';
require('../common');
console.error('before opening stdin');
process.stdin.resume();
console.error('stdin opened');

1
test/parallel/test-stdin-pause-resume.js

@ -1,4 +1,5 @@
'use strict';
require('../common');
console.error('before opening stdin');
process.stdin.resume();
console.error('stdin opened');

1
test/parallel/test-stdin-resume-pause.js

@ -1,3 +1,4 @@
'use strict';
require('../common');
process.stdin.resume();
process.stdin.pause();

1
test/parallel/test-string-decoder-end.js

@ -3,6 +3,7 @@
// the whole buffer at once, and that both match the .toString(enc)
// result of the entire buffer.
require('../common');
var assert = require('assert');
var SD = require('string_decoder').StringDecoder;
var encodings = ['base64', 'hex', 'utf8', 'utf16le', 'ucs2'];

1
test/parallel/test-sync-io-option.js

@ -1,5 +1,6 @@
'use strict';
require('../common');
const assert = require('assert');
const execFile = require('child_process').execFile;

1
test/parallel/test-timer-close.js

@ -1,4 +1,5 @@
'use strict';
require('../common');
var assert = require('assert');
var t = new (process.binding('timer_wrap').Timer);

1
test/parallel/test-timers-non-integer-delay.js

@ -15,6 +15,7 @@
* it 100%.
*/
require('../common');
var assert = require('assert');
var TIMEOUT_DELAY = 1.1;

1
test/parallel/test-timers-this.js

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

1
test/parallel/test-timers-unref-leak.js

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

1
test/parallel/test-timers-unrefd-interval-still-fires.js

@ -2,6 +2,7 @@
/*
* This test is a regression test for joyent/node#8900.
*/
require('../common');
var assert = require('assert');
var N = 5;

1
test/parallel/test-util-log.js

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

1
test/sequential/test-cluster-listening-port.js

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

1
test/sequential/test-vm-timeout-rethrow.js

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

Loading…
Cancel
Save