Allow CasperJS tests to use 'document' & 'window'

(imported from commit f3f3834d723c7b07e7aaff4ce8cab10a72255f22)
This commit is contained in:
Scott Feeney 2013-07-15 17:43:30 -04:00
parent eb93f20f95
commit 3395ac2fb1
1 changed files with 3 additions and 2 deletions

View File

@ -121,8 +121,9 @@ process.argv.forEach(function (filepath) {
options.node = true;
if (filepath.indexOf('zephyr/tests/frontend/') !== -1) {
// Include '$' because we use jQuery inside casper.evaluate
options.predef = ['casper', '$'];
// Include '$' and browser globals because we use them inside
// casper.evaluate
options.predef = ['casper', '$', 'document', 'window'];
} else {
options.predef = [];
}