I have a setup with karma. When I run karma start everything is ok. Tests are passing. But if try to do the same with grunt-karma the client.args does't apply!
This is how my karma config block in Gruntfile.js looks like:
...
karma: {
watch: {
configFile: 'karma.conf.js'
},
CI: {
configFile: 'karma.conf.js',
singleRun: true
}
}
...
grunt.loadNpmTasks('grunt-karma');
...
grunt.registerTask('dev', [
'karma:watch'
]);
...
In my karma.conf.js I have this client block with arguments to be passed to mocha:
client: {
mocha: {
ui: 'tdd'
}
},
So when I run grunt dev mocha doesn't get this ui parameter and that's why
'ReferenceError: Can't find variable: suite happens. I know that because if I comment client block in karma.conf.js and run karma start I get the same error. So why does this happen?
You can see my setup here: https://github.com/dKab/todo/tree/karma
I have a setup with karma. When I run
karma starteverything is ok. Tests are passing. But if try to do the same with grunt-karma the client.args does't apply!This is how my karma config block in
Gruntfile.jslooks like:In my karma.conf.js I have this
clientblock with arguments to be passed to mocha:So when I run
grunt devmocha doesn't get thisuiparameter and that's why'ReferenceError: Can't find variable: suitehappens. I know that because if I commentclientblock in karma.conf.js and runkarma startI get the same error. So why does this happen?You can see my setup here: https://github.com/dKab/todo/tree/karma