Angular 角7&;Phantom JS:0个测试中的0个在Jenkins上进行,没有任何浏览器

Angular 角7&;Phantom JS:0个测试中的0个在Jenkins上进行,没有任何浏览器,angular,phantomjs,karma-jasmine,Angular,Phantomjs,Karma Jasmine,我们不得不在项目中使用PhantomJS,因为无法在Jenkins机器上安装任何浏览器 当前karma配置如下所示: module.exports = function (config) { config.set({ basePath: '', frameworks: ['jasmine', '@angular-devkit/build-angular'], plugins: [ require('karma-jas

我们不得不在项目中使用PhantomJS,因为无法在Jenkins机器上安装任何浏览器

当前karma配置如下所示:

module.exports = function (config) {
    config.set({
        basePath: '',
        frameworks: ['jasmine', '@angular-devkit/build-angular'],
        plugins: [
            require('karma-jasmine'),
            require('karma-jasmine-html-reporter'),
            require('karma-coverage-istanbul-reporter'),
            require('karma-phantomjs-launcher'),
            require('@angular-devkit/build-angular/plugins/karma')
        ],
        client: {
            clearContext: false // leave Jasmine Spec Runner output visible in browser
        },
        coverageIstanbulReporter: {
            dir: require('path').join(__dirname, '../coverage'),
            reports: ['html', 'lcovonly'],
            fixWebpackSourcePaths: true
        },
        reporters: ['progress', 'kjhtml'],
        port: 9876,
        colors: true,
        logLevel: config.LOG_INFO,
        autoWatch: true,
        browsers: ['PhantomJS'],
        singleRun: true,
    });
};
这是工作没有任何问题之前。但在升级了依赖项并添加了更多测试->之后,我们现在出现了0个测试中的0个错误:

PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 0 of 0 ERROR (0.019 secs / 0 secs)
我在其他主题中尝试了很多建议(mime,检查测试中的特殊字符),但我仍然无法解决这个问题

有什么问题吗?测试能打破这个吗?或者最新版本NG根本无法使用最新(旧)版本的karma phantom js launcher

package.json
供参考:

{
  "name": "xx",
  "version": "xx",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "production": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build --c=production",
    "development": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build --c=development",
    "test": "ng test",
    "lint": "ng lint --type-check",
    "fix": "tslint --type-check --project tsconfig.json --fix '{src,e2e}/**/*.ts' -t verbose",
    "e2e": "ng e2e",
    "local-test": "ng test --karma-config src/karma.conf.local.js"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^7.2.13",
    "@angular/cdk": "^7.3.7",
    "@angular/common": "^7.2.13",
    "@angular/compiler": "^7.2.13",
    "@angular/core": "^7.2.13",
    "@angular/flex-layout": "^7.0.0-beta.24",
    "@angular/forms": "^7.2.13",
    "@angular/http": "^7.2.13",
    "@angular/material": "^7.3.7",
    "@angular/platform-browser": "^7.2.13",
    "@angular/platform-browser-dynamic": "^7.2.13",
    "@angular/router": "^7.2.13",
    "@ckeditor/ckeditor5-angular": "^1.1.0",
    "@ckeditor/ckeditor5-build-decoupled-document": "^12.1.0",
    "@ngx-translate/core": "^11.0.1",
    "@ngx-translate/http-loader": "^4.0.0",
    "core-js": "^2.6.5",
    "rxjs": "~6.4.0",
    "tslib": "^1.9.0",
    "zone.js": "^0.8.29"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.13.8",
    "@angular/cli": "^7.3.8",
    "@angular/compiler-cli": "^7.2.13",
    "@angular/language-service": "^7.2.13",
    "@types/jasmine": "^3.3.12",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~11.13.6",
    "codelyzer": "~5.0.0",
    "jasmine-core": "~3.4.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.1.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.5",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.4.0",
    "karma-phantomjs-launcher": "^1.0.4",
    "protractor": "~5.4.2",
    "ts-node": "~8.1.0",
    "tslint": "~5.16.0",
    "typescript": "^3.2.4"
  }
}

试着改用!你也需要一个Chrome二进制文件。我在一开始的时候说,在Jenkins机器上安装任何浏览器都是不可能的。