Search Posts

Category: karma-webpack

Unable to run angular4 test cases

I am getting an error (p.s. attached screenshot) when I run ng test in my angular4 app. I have not changed anything as such this just added some test specs in app.component.spec.ts My karma.config.js file has following code module.exports = function (config) { config.set({ basePath: ”, frameworks: [‘jasmine’, ‘angular-cli’], plugins: [ require(‘karma-jasmine’), require(‘karma-chrome-launcher’), require(‘karma-remap-istanbul’), require(‘angular-cli/plugins/karma’) ], files: [ { pattern: ‘./src/test.ts’, watched: false } ], preprocessors: { ‘./src/test.ts’: [‘angular-cli’] }, mime: { ‘text/x-typescript’: [‘ts’,’tsx’] }, […]