mirror of https://github.com/nodejs/node.git
28 lines
555 B
JavaScript
28 lines
555 B
JavaScript
|
var assert = require('assert');
|
||
|
|
||
|
var knownGlobals = [ setTimeout
|
||
|
, setInterval
|
||
|
, clearTimeout
|
||
|
, clearInterval
|
||
|
, console
|
||
|
, Buffer
|
||
|
, process
|
||
|
, global
|
||
|
];
|
||
|
|
||
|
for (var x in global) {
|
||
|
var found = false;
|
||
|
|
||
|
for (var y in knownGlobals) {
|
||
|
if (global[x] === knownGlobals[y]) {
|
||
|
found = true;
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if (!found) {
|
||
|
console.error("Unknown global: %s", x);
|
||
|
assert.ok(false);
|
||
|
}
|
||
|
}
|