Grunt's collaborative task doesn't display anything

I want my Grunt-based configuration to run both a “test” (for example, unit tests) and a “server” (that is, a web server) at the same time, so I can just do grunt testAndServeras ( and update as if changing any file) in the same terminal.

Code (most of it is based on a stand yo angular):

// in initConfig:
concurrent: {
  testAndWebServer: [
    'karma',
    'watch'
  ]
},

and later

grunt.registerTask('testAndServer', function (target) {
  if (target === 'dist') {
    return grunt.task.run(['build', 'open', 'connect:dist:keepalive']);
  }

  grunt.task.run([
    'clean:server',
    'concurrent:server',
    'autoprefixer',
    'compass',
    'connect:livereload',
    'open',
    'concurrent:testAndWebServer'
  ]);
});

It really works, but I do not get any output in the terminal window (PowerShell). I would like the karma task to show test results. How can I achieve this?

I am running Node.js v0.10.20 on Windows 7 on a quad-core computer.

+4
1

, logConcurrentOutput.

:

  testAndWebServer: {
    tasks: ['watch', 'karma'],
    options: { logConcurrentOutput: true }
  },
+6

All Articles