gruntjs - Warning: Task "webTest" not found -


i cannot figure out why cannot register these 2 tests in 1 gruntfile. when run grunt test, runs fine. when run grunt web, gives me warning: task "webtest" not found. code within each task same, why if grunt allowing 1 task register?

// gruntfile.js module.exports = function(grunt){   // load grunt mocha task   grunt.loadnpmtasks('grunt-mocha');   grunt.loadnpmtasks('grunt-mocha-test');   grunt.loadnpmtasks('grunt-contrib');    grunt.initconfig({     pkg: grunt.file.readjson('package.json'),      // webtest     webtest: {           test: {             options: {               reporter: 'list',               timeout: 2000             },             src: ['all.js',                         'test/groups.js',                         'test/doctors.js',                         'test/patients.js',                         'test/diet.js']           }         },      // mocha test     mochatest: {           test: {             options: {               reporter: 'list',               timeout: 2000             },             src: ['all.js',                         'test/groups.js',                         'test/doctors.js',                         'test/patients.js',                         'test/diet.js']           }         }   });    grunt.registertask('web', ['webtest']);   grunt.registertask('test', ['mochatest']); }; 

figured out:

// gruntfile.js module.exports = function(grunt){   // load grunt mocha task   grunt.loadnpmtasks('grunt-mocha');   grunt.loadnpmtasks('grunt-mocha-test');   grunt.loadnpmtasks('grunt-contrib');    grunt.initconfig({     pkg: grunt.file.readjson('package.json'),      // mocha test     mochatest: {           test: {             options: {               reporter: 'list',               timeout: 2000             },             src: ['test/groups.js',                         'test/doctors.js',                         'test/patients.js',                         'test/diet.js']           },           web_enter: { // fill database website testing             options: {               reporter: 'list',               timeout: 2000             },             src: ['test/web_testing_enter.js']           },           web_remove: { // remove data entered website testing             options: {               reporter: 'list',               timeout: 2000             },             src: ['test/web_testing_remove.js']           }         }   });    grunt.registertask('we', ['mochatest:web_enter']);   grunt.registertask('wr', ['mochatest:web_remove']);   grunt.registertask('default', ['mochatest:test']); }; 

Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -