Open sashasochka opened 9 years ago
What other karma plugins are you using alongside karma-jspm
?
I use
"karma": "0.12.31",
"karma-babel-preprocessor": "4.0.0",
"karma-chrome-launcher": "0.1.7",
"karma-coverage": "0.2.7",
"karma-firefox-launcher": "0.1.4",
"karma-jasmine": "0.3.5",
"karma-jspm": "1.1.4",
"karma-junit-reporter": "0.2.2",
"karma-phantomjs-launcher": "0.1.4",
"karma-phantomjs-shim": "1.0.0",
"karma-verbose-reporter": "0.0.1",
Here is the whole karma.conf.js
module.exports = function (config) {
config.set({
autoWatch: true,
singleRun: true,
colors: true,
browsers: ['PhantomJS'],
captureTimeout: 10000,
reportSlowerThan: 5000,
files: [
'.tmp/public/js/es6-polyfill.js'
],
frameworks: ['jasmine', 'jspm', 'phantomjs-shim'],
reporters: ['progress', 'verbose', 'coverage'],
jspm: {
// Edit this to your needs
config: 'assets/js/config.js',
loadFiles: [
'test/unit/*.js'
],
serveFiles: [
'assets/js/*.js',
'.tmp/public/js/templates.js',
'.tmp/public/components/**/*.js'
]
},
proxies: {
'/base/js/templates.js': '/base/.tmp/public/js/templates.js',
'/base/js': '/base/assets/js',
'/base/components': '/base/.tmp/public/components',
'/jspm_packages': '/base/jspm_packages'
},
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'test/unit/*.js': ['babel', 'coverage'],
'assets/js/*.js': ['babel', 'coverage']
},
coverageReporter: {
type: 'lcov',
dir: '.tmp/coverage/'
}
});
};
If I run
karma run
using this plugin (karma start
is OK) it crashes in this file (part of karma package):node_modules/karma/lib/reporters/multi.js:
The error is that
reporter.adapters
is not defined. Patching karma's multi.js helps, but that's not the right place to fix.