diff --git a/nightwatch.json b/nightwatch.json index c0788ee..a51333d 100644 --- a/nightwatch.json +++ b/nightwatch.json @@ -1,17 +1,19 @@ { - "src_folders" : ["test/nightwatch"], + "src_folders" : ["test/nightwatch"], + "globals": "test/nightwatch/globals.js", - "test_settings" : { - "default" : { - "silent": true, - "screenshots" : { - "enabled" : false, - "path" : "" - }, - "desiredCapabilities": { - "browserName": "phantomjs", - "javascriptEnabled" : true - } - } - } + "test_settings" : { + "default" : { + "silent": true, + "exclude": "globals.js", + "screenshots" : { + "enabled" : false, + "path" : "" + }, + "desiredCapabilities": { + "browserName": "phantomjs", + "javascriptEnabled" : true + } + } + } } diff --git a/test/nightwatch/globals.js b/test/nightwatch/globals.js new file mode 100644 index 0000000..998dfe1 --- /dev/null +++ b/test/nightwatch/globals.js @@ -0,0 +1,7 @@ +module.exports = { + before : function(cb) { + console.log("Requiring fetch polyfill"); + require('whatwg-fetch'); + cb(); + } +};