2014-05-09 16 views
5

Viene visualizzato il seguente avviso quando corro grunt test e non mi dà il risultato previsto, che sta scrivendo l'avanzamento dei test unitari.Esecuzione dell'attività "karma: unit" (karma) WARN [reporter]: Impossibile caricare "html", non è registrato! Forse ti manca qualche plugin?

errore: -

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. 

report HTML plug-in di integrazione karma.config.js: -

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

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

qualcuno mi può indicare la causa?

risposta

11

Prima di tutto, assicurarsi che sia stato installato - ci dovrebbe essere una directory reporter karma-html in node_modules nella directory da cui si stanno eseguendo i test. Se non funziona:

npm install karma-html-reporter

Poi confermare il possesso di 'karma-html-giornalista' in plugins nella conf, cioè:

 
plugins: [ 
    'karma-teamcity-reporter', 
    'karma-jasmine', 
    'karma-coverage', 
    'karma-chrome-launcher', 
    'karma-phantomjs-launcher', 
    'karma-html-reporter' 
]