Search Posts

Category: karma-coverage

Error on setting up karma, jasmine for Angular1.x application with requirejs configuration

Our Angular 1.x application uses requirejs For setting up karma – jasmine we have used below karma conf file: module.exports = function(config) { config.set({ basePath: ”, frameworks: [‘jasmine’], files: [ ‘node_modules/angular/angular.js’, ‘node_modules/angular-mocks/angular-mocks.js’, ‘src/test/**/*.spec.js’, ‘src/**/*.js’ ], exclude: [ ], preprocessors: { ‘src/main/webapp/js/**/*.js’ }, coverageReporter: { type: ‘html’, dir: ‘coverage’ }, plugins: [ ‘karma-jasmine’, ‘karma-chrome-launcher’, ‘karma-coverage’ ] reporters: [‘progress’, ‘coverage’], port: 9876, colors: true, logLevel: config.LOG_INFO, autoWatch: true, browsers: [‘Chrome’], singleRun: false, concurrency: Infinity }) } But […]