Closed jeffrey-l-turner closed 10 years ago
In strict mode, window needs to be defined before it can be used. I'm not sure if using strict mode for files outside of src/ is an objective, especially since these files are used for unit tests, and not in the service itself.
Specifically:
$ npm test
CURL: /usr/bin/curl <...> /home/jlt/node-xmpp-bosh/strophe/strophe.js:69 window = {XMLHttpRequest: XMLHttpRequest, Base64: Base64, MD5: MD5}; ^ ReferenceError: window is not defined at Object. (/home/jlt/TrXRTR/strophe/strophe.js:69:8)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/jlt/TrXRTR/tests/basic.js:34:15)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
<...>