angularjs - Karma unit testing - error during loading plugin -
i'm trying run first unit tests using karma karma-junit-reporter plugin. i'm getting warning:
> node node_modules/karma/bin/karma start test/karma.conf.js warn [plugin]: error during loading "karma-junit-reporter" plugin: cannot find module 'xmlbuilder' warn [reporter]: can not load "junit", not registered! perhaps missing plugin?
but installed plugin in app's main folder (using npmbox since don't have access internet) , xmlbuilder folder placed in node_modules. here's part of karma config:
frameworks: ['jasmine-jquery','jasmine'], browsers : ['chrome'], plugins : [ 'karma-chrome-launcher', 'karma-junit-reporter', 'karma-jasmine-jquery', 'karma-jasmine' ], reporters: ['junit'], junitreporter : { outputfile: 'test_out/unit.xml', suite: 'unit' }
make sure directory ./node_modules/xmlbuilder exist.
when run npm install somemodule @ d:/test, stored d:/test/node_modules/somemodule, can require module in d:/test/.js, , can not require @ d:/other/place/.js. if hope module can required anywhere should run :
npm install somemodule -g
Comments
Post a Comment