mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
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);
|
|
}
|
|
}
|