Running "karma:unit" (karma) task WARN [reporter]: Can not load "html", it is not registered! Perhaps you are missing some plugin?

StackOverflow https://stackoverflow.com/questions/23562334

Domanda

I'm getting following warn when I ran grunt test and doesn't give me the expected result, which is writing the progress of unit tests.

error:-

Running "karma:unit" (karma) task
WARN [reporter]: Can not load "html", it is not registered!



Perhaps you are missing some plugin?

INFO [karma]: Karma v0.12.15 server started at http://localhost:8080/

INFO [launcher]: Starting browser Chrome
WARN [watcher]: Pattern "F:/AngularExamples/TestingAngular/test/mock/**/*.js" do
es not match any file.

INFO [Chrome 34.0.1847 (Windows 7)]: Connected on socket Mxn9RZeJcSW1gjL_e3d2 wi
th id 36948068
Chrome 34.0.1847 (Windows 7): Executed 1 of 1 SUCCESS (0.04 secs / 0.037 secs)

Done, without errors.

html report plugin integration in karma.config.js :-

reporters: ['progress', 'html'],

// the default configuration
htmlReporter: {
  outputDir: 'karma_html',
  templatePath: __dirname+'/jasmine_template.html'
},

can someone point me the cause?

È stato utile?

Soluzione

First, make sure it has been installed - there should be a karma-html-reporter directory in node_modules in the directory from which you are running the tests. If not run:

npm install karma-html-reporter

Then confirm you have 'karma-html-reporter' in plugins in the conf, i.e:

plugins: [
  'karma-teamcity-reporter',
  'karma-jasmine',
  'karma-coverage',
  'karma-chrome-launcher',
  'karma-phantomjs-launcher',
  'karma-html-reporter'
]
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top