ng test在Firefox浏览器中给出错误

时间:2019-01-23 11:53:11

标签: angular karma-runner

运行ng测试时出现以下错误,(Firefox浏览器随Karama.conf.js添加) 无法加载浏览器“ Firefox”:未注册!也许您缺少一些插件?

2 个答案:

答案 0 :(得分:1)

添加以下依赖项可解决此问题:

plugins: [
      require('core-js/es6/promise'),
      require('karma-jasmine'),
      require('karma-ie-launcher'),
      require('karma-chrome-launcher'),
      require('karma-firefox-launcher'),
      require('karma-jasmine-html-reporter'),
      require('karma-coverage-istanbul-reporter'),
      require('@angular-devkit/build-angular/plugins/karma'),
      'karma-spec-reporter'
    ],

答案 1 :(得分:0)

检查您的业力配置文件以查看列出的firefox插件,

插件:[     'karma-junit-reporter',     “业力铬发射器”,     '因果报应-火狐发射器'     ]