mercredi 14 août 2019

ng test doesn't execute any test cases

I am using angular2 and wants to implement jasmine-karma testing. When i run ng test it runs without errors but doesn't execute any test cases(says 0 executed 0 errors).Gives warnings for test.ts file with ""C:/Users/T01192B/Applications/capital-markets-frm-insight-profile/src/test.ts" does not match any file." Its not picking the test.ts from the path.

Tried to the change the karma.config.js files nothing works.

module.exports = function (config) { config.set({ basePath: ' ', frameworks: ['jasmine', '@angular/cli'], plugins: [ require('karma-jasmine'), require('karma-chrome-launcher'), require('karma-jasmine-html-reporter'), require('karma-coverage-istanbul-reporter'), require('@angular/cli/plugins/karma') ], client:{ clearContext: false // leave Jasmine Spec Runner output visible in browser }, files: [ { pattern: './src/test.ts', watched: false } ], preprocessors: { './src/test.ts': ['@angular/cli'] }, mime: { 'text/x-typescript': ['ts','tsx'] }, coverageIstanbulReporter: { reports: [ 'html', 'lcovonly' ], fixWebpackSourcePaths: true }, angularCli: { environment: 'dev' }, reporters: config.angularCli && config.angularCli.codeCoverage ? ['progress', 'coverage-istanbul'] : ['progress', 'kjhtml'], port: 9876, colors: true, logLevel: config.LOG_INFO, autoWatch: true, browsers: ['Chrome'], singleRun: false }); };

Aucun commentaire:

Enregistrer un commentaire