grunt-mocha-phantomjs
grunt-mocha-phantomjs copied to clipboard
Error when trying to set the 'hooks' option
I need to use the 'hooks' option of mocha-phantomjs but I cannot set it correctly in Gruntfile.
The following instruction works correctly in terminal:
mocha-phantomjs ./test/test.html --hooks ./test/phantom_hooks.js -R xunit -f test/results/result.xml
In my Gruntfile.js
, I have put the following configuration:
grunt.initConfig({
...
mocha_phantomjs: {
options: {
reporter: 'xunit',
output: 'test/results/result.xml',
config: {
"hooks": './test/phantom_hooks.js'
}
},
all: 'test/test.html'
}
});
When I run grunt mocha_phantomjs
I get the following error:
Error loading hooks: Cannot find module './test/phantom_hooks.js'
Am I doing something wrong or is this an issue of the plugin?