私はangle-cliでプロジェクトを作成しました。 ユニットテストはローカルシステムで正常に動作します。 私はビルドの一部としてテストを実行すると、VSTSに私は次のエラーを取得する:angular-cli - ユニットテストはVSTSで実行できませんか?
> ng test --cc Your global Angular CLI version (1.4.9) is greater than your local version (1.4.7). The local Angular CLI version is used. To
> disable this warning use "ng set --global
> warnings.versionMismatch=false". [32m26 10 2017 04:28:02.079:INFO
> [karma]: [39mKarma v1.7.1 server started at http://0.0.0.0:9876/
> [32m26 10 2017 04:28:02.081:INFO [launcher]: **[39mLaunching browser
> ChromeHeadlessNoSandbox with unlimited concurrency [32m26 10 2017
> 04:28:02.089:INFO [launcher]: [39mStarting browser ChromeHeadless
> [33m26 10 2017 04:29:02.092:WARN [launcher]: [**39mChromeHeadless have
> not captured in 60000 ms, killing****. [33m26 10 2017 04:29:04.095:WARN
> [launcher]: [**39mChromeHeadless was not killed in 2000 ms, sending
> SIGKILL**. [33m26 10 2017 04:29:06.095:WARN [launcher]:
> [**39mChromeHeadless was not killed by SIGKILL in 2000 ms, continuing**.
> Process completed with exit code 1.
カルマの設定は次のようになります。
> 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 }, coverageIstanbulReporter: { reports: ['html',
> 'lcovonly'], fixWebpackSourcePaths: true }, mime: {
> 'text/x-typescript': ['ts', 'tsx'] }, angularCli: { environment:
> 'dev' }, reporters: ['progress', 'kjhtml'], port: 9876,
> colors: true, logLevel: config.LOG_INFO, autoWatch: false,
> browsers: ['ChromeHeadlessNoSandbox'], customLaunchers: {
> ChromeHeadlessNoSandbox: {
> base: 'ChromeHeadless',
> flags: [
> '--no-sandbox', // required to run without privileges
> '--disable-gpu',
> // Without a remote debugging port, Google Chrome exits immediately.
> '--remote-debugging-port=9222'
> ] } }, captureTimeout: 60000, singleRun: true, browserNoActivityTimeout : 10000000 }); };
そしてpackage.jsonは以下の通りです:
"private": true, "dependencies": { "@angular/animations": "^4.2.4", "@angular/common": "^4.2.4", "@angular/compiler": "^4.2.4", "@angular/core": "^4.2.4", "@angular/forms": "^4.2.4", "@angular/http": "^4.2.4" }, "devDependencies": { "@angular/cli": "1.4.7", "@angular/compiler-cli": "^4.2.4", "@angular/language-service": "^4.2.4", "@types/jasmine": "~2.5.53", "@types/jasminewd2": "~2.0.2", "@types/node": "~6.0.60", "codelyzer": "~3.2.0", "jasmine-core": "~2.6.2", "jasmine-spec-reporter": "~4.1.0", "karma": "~1.7.0", "karma-chrome-launcher": "~2.1.1", "karma-cli": "~1.0.1", "karma-coverage-istanbul-reporter": "^1.2.1", "karma-jasmine": "~1.1.0" } }
エラーの解決にお手伝いがあります。
ありがとうございます。
?この「VSTS Chromium Build Tasks」をVSTSに追加しました。 – user2439903
@ user2439903あなたがそれを得るならそれは素晴らしいです。このタスクは、プレビューバージョンatmです。 – Kuncevic
まだ動作していません:(その他のソリューション? – user2439903