javascript - grunt failing to find task -
here grunt file, want start http-server , kick off protractor tests. i'm guessing syntax off??
'use strict'; module.exports = function(grunt) { grunt.initconfig({ karma: { options: { configfile: 'www/test/karma-conf.js' }, unit: { singlerun: true }, continuous: { background: true } }, protractor: { options: { configfile: "www/test/frontend.conf.js", // default config file // keepalive: true, // if false, grunt process stops when test fails. nocolor: false, // if true, protractor not use colors in output. // debug: true, args: { } }, e2e: { options: { keepalive: false } }, continuous: { options: { keepalive: true } } }, watch: { options: { livereload: true }, karma: { files: ['www/js/**/*.js', 'www/test/unit/*.js'], tasks: ['karma:continuous:run'] } , protractor: { files: ['www/js/**/*.js', 'www/test/e2e/*.js'], tasks: ['protractor:continuous'] } }, run: { mock_server: { options: { wait: false }, args: ['app/mockapi/apiserver.js'] } }, connect: { options: { port: 9000, hostname: 'localhost' }, livereload: { options: { livereload: 35729, open: true, base: ['www'] } }, test: { options: { base: ['www'] } } } }); //grunt.loadnpmtasks('grunt-contrib-watch'); //grunt.loadnpmtasks('grunt-contrib-connect'); //grunt.loadnpmtasks('grunt-karma'); //grunt.loadnpmtasks('grunt-protractor-runner'); //grunt.loadnpmtasks('grunt-run'); grunt.registertask('serve', ['karma:continuous:start', 'run:mock_server', 'connect:livereload', 'watch:karma']); grunt.registertask('unit-test', ['karma:continuous:start', 'watch:karma']); grunt.registertask('e2e-test', ['connect:test', 'protractor:continuous', 'watch:protractor']); grunt.registertask('test', ['karma:unit:start', 'connect:test', 'run:mock_server', 'protractor:e2e']); };
all when running following error :
$ grunt e2e-test --verbose initializing command-line options: --verbose reading "gruntfile.js" gruntfile...ok registering gruntfile tasks. initializing config...ok loading "gruntfile.js" tasks...ok + e2e-test, serve, test, unit-test running tasks: e2e-test running "e2e-test" task warning: task "connect:test" not found. use --force continue. aborted due warnings.
i believe need uncomment grunt.loadnpmtasks('grunt-contrib-connect');
Comments
Post a Comment