错误:在Angular CLI> 6.0中,Karma插件现在由“ @ angular-devkit / build-angular”导出

时间:2019-09-23 09:29:08

标签: angular unit-testing jasmine karma-runner

错误:在Angular CLI> 6.0中,Karma插件现在由“ @ angular-devkit / build-angular”导出 我收到此错误

// Karma配置文件,请参阅链接以获取更多信息 // https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports =函数(配置){   config.set({     basePath:”,     框架:['jasmine','@ angular-devkit / build-angular'],     插件:[       require('karma-jasmine'),       require('karma-chrome-launcher'),       require('karma-jasmine-html-reporter'),       require('karma-coverage-istanbul-reporter'),       要求('@ angular / cli / plugins / karma')     ],     客户:{       clearContext:false //使Jasmine Spec Runner输出在浏览器中可见     },     coverageIstanbulReporter:{       报告:['html','lcovonly'],       fixWebpackSourcePaths:是     },     angularCli:{       环境:“ dev”     },     记者:['progress','kjhtml'],     端口:9876,     颜色:真实,     logLevel:config.LOG_INFO,     autoWatch:是的,     浏览器:['Chrome'],     singleRun:错误   }); };

1 个答案:

答案 0 :(得分:0)

在您的Karma.conf.js中,将@angular/cli替换为@angular-devkit/build-angular