Skip to content
Permalink
Browse files

[test] Make global detection work with older node versions

  • Loading branch information...
mmalecki committed Oct 28, 2012
1 parent fefbf04 commit 3531fd609a8ce156d27c27ca38ac912a73aebfeb
Showing with 9 additions and 3 deletions.
  1. +9 −3 test/core/common.js
@@ -82,15 +82,18 @@ process.on('exit', function() {
if (!exports.globalCheck) return;
var knownGlobals = [setTimeout,
setInterval,
setImmediate,
clearTimeout,
clearInterval,
clearImmediate,
console,
Buffer,
process,
global];

if (global.setImmediate) {
knownGlobals.push(setImmediate);
knownGlobals.push(clearImmediate);
}

if (global.errno) {
knownGlobals.push(errno);
}
@@ -114,14 +117,17 @@ process.on('exit', function() {
knownGlobals.push(ArrayBuffer);
knownGlobals.push(Int8Array);
knownGlobals.push(Uint8Array);
knownGlobals.push(Uint8ClampedArray);
knownGlobals.push(Int16Array);
knownGlobals.push(Uint16Array);
knownGlobals.push(Int32Array);
knownGlobals.push(Uint32Array);
knownGlobals.push(Float32Array);
knownGlobals.push(Float64Array);
knownGlobals.push(DataView);

if (global.Uint8ClampedArray) {
knownGlobals.push(Uint8ClampedArray);
}
}

for (var x in global) {

0 comments on commit 3531fd6

Please sign in to comment.
You can’t perform that action at this time.