How to pass argument from grunt job to karma-runner
I am using grunt-karma to run a unit test package. I need to find the value from a grunt task and then pass the value to karma for use in tests.
The Grunt task doing the search:
grunt.registerMultiTask('lookup', 'Lookup value', function() {
var value = 5; // just hard code here for now
I need to pass the value to the grunt-karma job as defined:
karma: {
options: {
configFile: 'karma.conf.js'
},
Can I use grunt.config to pass karma runner value?
var value = 5; //just hardcode here for now
...
grunt.config("karma.customParam",value);
And how can I get the value from the test specs?
+3
source to share