突然(没有代码更改)PhantomJS 2.1.1中针对Angular 4.0.0 angular-cli 1.0.0项目的业力单元测试失败并出现相当不透明的错误:
[INFO] PhantomJS 2.1.1 (Linux 0.0.0) ERROR
[INFO] {
[INFO] "__zone_symbol__currentTask": {
[INFO] "type": "microTask",
[INFO] "state": "notScheduled",
[INFO] "source": "Promise.then",
[INFO] "zone": "<root>",
[INFO] "cancelFn": null,
[INFO] "runCount": 0
[INFO] }
[INFO] }
[INFO]
[INFO] PhantomJS 2.1.1 (Linux 0.0.0) ERROR
[INFO] {
[INFO] "__zone_symbol__currentTask": {
[INFO] "type": "microTask",
[INFO] "state": "notScheduled",
[INFO] "source": "Promise.then",
[INFO] "zone": "<root>",
[INFO] "cancelFn": null,
[INFO] "runCount": 0
[INFO] }
[INFO] }
[INFO]
[INFO]
[INFO]
使用Node v6.9.1,npm 3.10.8。
package.json的内容:
{
"name": "f2",
"version": "1.0.0",
"description": "Geneva UI - Fast and Furious",
"devDependencies": {
"angular": "~1.5",
"angular-messages": "1.6.2",
"angular-resource": "~1.5",
"angular-ui-bootstrap": "~2.5",
"angular-ui-router": "~0.3.1",
"angular-touch": "~1.5",
"angular-sanitize": "~1.5",
"angular-cookies": "~1.5",
"angular-animate": "~1.5",
"angular-translate": "~2.7",
"angular-highlightjs": "~0.7.1",
"angular-clipboard": "1.5.0",
"highlight.js": "~9.10.0",
"CSV-JS": "~1.2",
"uigrid": "~3.0",
"highcharts": "5.0.8",
"@types/highcharts": "^5.0.8",
"moment": "^2.10",
"moment-timezone-with-data-2010-2020": "0.4.0",
"bootstrap-colorpicker": "~2.3",
"ng-bootstrap-tree": "1.0.0",
"ng-circle-progress": "0.9.6",
"jstz": "1.0.9",
"highcharts-export-csv": "1.4.6",
"@angular/animations": "4.0.0",
"@angular/cli": "1.0.0",
"@angular/common": "4.0.0",
"@angular/compiler": "4.0.0",
"@angular/compiler-cli": "4.0.0",
"@angular/core": "4.0.0",
"@angular/forms": "4.0.0",
"@angular/http": "4.0.0",
"@angular/platform-browser": "4.0.0",
"@angular/platform-browser-dynamic": "4.0.0",
"@angular/platform-server": "4.0.0",
"@angular/router": "4.0.0",
"@angular/upgrade": "2.4.4",
"@types/angular": "1.6.5",
"@types/angular-resource": "1.5.8",
"@types/angular-ui-bootstrap": "0.13.40",
"@types/angular-ui-router": "1.1.36",
"@types/jasmine": "2.5.52",
"@types/jquery": "2.0.40",
"@types/lodash": "^4.14.63",
"add-stream": "^1.0.0",
"angular2-busy": "^2.0.1",
"bootstrap": "^3.3.6",
"codelyzer": "~3.0.1",
"core-js": "^2.4.1",
"gulp": "^3.9.0",
"gulp-angular-templatecache": "^1.8.0",
"gulp-concat": "^2.6.0",
"gulp-filter": "^3.0.1",
"gulp-flatten": "^0.2.0",
"gulp-inject": "^3.0.0",
"gulp-inline-ng2-template": "4.0.0",
"gulp-jshint": "^1.11.2",
"gulp-livereload": "^3.8.1",
"gulp-minify-css": "^1.2.1",
"gulp-minify-html": "^1.0.4",
"gulp-rename": "^1.2.2",
"gulp-rev": "^6.0.1",
"gulp-rimraf": "^0.2.0",
"gulp-sourcemaps": "^1.6.0",
"gulp-systemjs-builder": "0.15.0",
"gulp-typescript": "3.1.3",
"gulp-typings": "^2.0.3",
"gulp-uglify": "^1.2.0",
"jasmine-core": "2.6.3",
"jasmine-reporters": "^2.2.1",
"jasmine-spec-reporter": "4.1.0",
"jquery": "^1.11.3",
"jquery-ui-dist": "~1.12.0",
"karma": "1.7.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.1.0",
"karma-phantomjs-launcher": "^1.0.4",
"karma-remap-istanbul": "^0.6.0",
"ng-bootstrap": "1.6.3",
"ng2-dragula": "^1.5.0",
"ng2-slimscroll": "^2.0.1",
"ng2-tooltip": "0.0.7",
"ngx-bootstrap": "^1.8.1",
"ngx-clipboard": "~8.0.2",
"ngx-popover": "0.0.16",
"@ngx-translate/core": "^7.1.0",
"primeng": "4.1.2",
"protractor": "~5.2.0",
"protractor-jasmine2-screenshot-reporter": "^0.5.0",
"require-dir": "^0.3.0",
"run-sequence": "^1.1.4",
"rxjs": "~5.0.3",
"systemjs": "0.19.40",
"ts-helpers": "^1.1.2",
"tslint": "~5.4.3",
"ts-node": "3.3.0",
"typescript": "~2.3.4",
"zone.js": "^0.8.4",
"ngx-infinite-scroll": "^0.5.2"
},
"license": "ISC"
}
这是一个Angular项目,单元测试确实使用了Promise,但他们之前从未遇到过这个问题。
其中一些版本未固定,因此可能会有最新版本更改。我正在寻找并可能期待找到一个罪魁祸首库。