I have installed some karma plugins, like: karma-requirejs, karma-jasmine... globally using npm install -g
Now i want to use them in a karma test execution. The only way i found to use them ist to use the require function in the plugins section of the karma config:
plugins: [
require('/usr/local/lib/node_modules/karma-requirejs'),
require('/usr/local/lib/node_modules/karma-jasmine'),
require('/usr/local/lib/node_modules/karma-junit-reporter'),
require('/usr/local/lib/node_modules/karma-phantomjs-launcher'),
require('/usr/local/lib/node_modules/karma-coverage'),
require('/usr/local/lib/node_modules/karma-requirejs')
],
I thought karma would first look at the local node_modules and then at the global. But i have to set the full Path. Is there a way to use the global installed plugins without the full path?