Reputation: 2311
I'm new to Karma and I've just followed their install and configuration tutorial. I started the Karma using:
karma start my.conf.js
But I'm getting an error:
INFO [karma]: Karma v0.12.23 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 37.0.2062 (Windows 7)]: Connected on socket ZQsMdsAHICuCrj3MXcDz with id 90144583
Chrome 37.0.2062 (Windows 7) ERROR
Uncaught Error: jasmine.Suite() required
at local/Projects/webserver/node_modules/karma-jasmine/lib/jasmine.js:2294
I'm running node-express and anguler+requirejs. Any idea why this error happens? How it can be fixed?
Thanks
EDIT: My my.conf.js file:
// Karma configuration // Generated on Thu Sep 18 2014 18:11:55 GMT+0300 (Jerusalem Daylight Time)
module.exports = function(config) { config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: './',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine', 'requirejs'],
// list of files / patterns to load in the browser
files: [
'public/test/test-main.js',
{pattern: 'public/js/**/*.js', included: false},
{pattern: 'public/lib/**/*.js', included: false},
{pattern: 'public/test/**/*Spec.js', included: false}
],
// list of files to exclude
exclude: [
'public/js/main.js'
],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Chrome'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false
}); };
Upvotes: 1
Views: 1315
Reputation: 2311
I've solved the issue by reinstalling karma, jasmine and karma-jasmine and karma-requirejs. For some reason, it didn't work at first.
Upvotes: 0