Closed krunkosaurus closed 10 years ago
Support should be there already. https://github.com/metaskills/mocha-phantomjs#usage
Using --settings
you can set `webSecurityEnabled
to false.
mocha_phantomjs: {
no_output: {
options: {
'reporter': 'dot',
'settings': 'webSecurityEnabled=false'
},
files: {
src: ['test/index.html']
}
}
}
Is this meant to still work? This doesn't seem to work as expected with the latest version. I'm getting a NETWORK_ERR: XMLHttpRequest Exception 101
when attempting to make an AJAX call from tests running with mocha_phantomjs.
Nevermind I figured it out; looks like the syntax is different (that or there is some other way to make the above solution to work and there are two ways to do it).
mocha_phantomjs: {
options: {
phantomConfig:{
"--web-security": false
}
},
files: {
src: ["test/specRunner.html"]
}
}
Can we build in support for disabling security options in phantom within mocha_phantomjs Grunt task options?