I'm using grunt-mocha-test
to run node server side tests.
My Gruntfile.js looks like this
module.exports = function(grunt) {
// Add the grunt-mocha-test tasks.
grunt.loadNpmTasks('grunt-mocha-test');
grunt.initConfig({
// Configure a mochaTest task
mochaTest: {
test: {
options: {
reporter: 'dot'
},
src: [ 'test/setup.js', 'test/*.test.js' ]
}
},
});
grunt.registerTask('default', 'mochaTest');
};
What I want to do is this, I want to be able to run different test groups with different commands as follows
grunt
will run all tests
grunt test1
runs a subset of tests in the test folder, and
grunt test2
runs another subset of tests
I don't know if this is possible, and I haven't been able to find anything about this in the documentation for grunt-mocha-test
I could sure use some help here. Thanks
At the moment you have one group called test
. Just add another object inside mochaTest
and call grunt mochaTest:test2
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With