I am using this Grunt file and have set up the Jasmine specs.
The grunt file is obviously using the module.export syntax but the jasmine task runs in phantom.js headless browser. So the browser doesn't recognise the module.export syntax.
I just don't know how to get around this??
module.exports = function (grunt) {
grunt.initConfig({
jasmine: {
src: '*.js',
options: {
specs: '*Spec.js',
outfile: '_SpecRunner.html'
}
},
jshint: {
files: ['Gruntfile.js', '*.js'],
},
watch: {
files: ['<%= jshint.files %>'],
tasks: ['jshint']
}
});
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['jshint']);
grunt.registerTask('watch', ['watch']);
grunt.registerTask('test', ['jasmine']);
};
This is my error:
>> ReferenceError: Can't find variable: module at
>> Gruntfile.js:1