From 0c27cf5128ae58cade833e3a98572189b8829784 Mon Sep 17 00:00:00 2001 From: Dan Schulte Date: Thu, 13 Dec 2018 15:28:51 -0800 Subject: [PATCH] Add test results to pipeline --- .gitignore | 1 + azure-pipelines-job.yml | 4 ++++ package.json | 1 + test/mocha.opts | 1 + 4 files changed, 7 insertions(+) diff --git a/.gitignore b/.gitignore index f28cc59..f79ac16 100644 --- a/.gitignore +++ b/.gitignore @@ -90,6 +90,7 @@ dist/ *.d.ts.map *.js *.js.map +test-results.xml # Rollup !rollup.config.js diff --git a/azure-pipelines-job.yml b/azure-pipelines-job.yml index ded6ce7..a20fe02 100644 --- a/azure-pipelines-job.yml +++ b/azure-pipelines-job.yml @@ -26,3 +26,7 @@ jobs: artifactName: dist downloadPath: $(System.DefaultWorkingDirectory) - script: 'npm test' + - task: PublishTestResults@2 + inputs: + testResultsFiles: '**/test-results.xml' + testRunTitle: 'Test results for JavaScript' diff --git a/package.json b/package.json index 0834e64..c4d9675 100644 --- a/package.json +++ b/package.json @@ -76,6 +76,7 @@ "glob": "^7.1.2", "mocha": "^5.1.1", "mocha-chrome": "^1.1.0", + "mocha-junit-reporter": "^1.18.0", "npm-run-all": "^4.1.5", "rollup": "^0.67.3", "rollup-plugin-alias": "^1.4.0", diff --git a/test/mocha.opts b/test/mocha.opts index e77fe9a..2f4aca1 100644 --- a/test/mocha.opts +++ b/test/mocha.opts @@ -1,6 +1,7 @@ --require ts-node/register --timeout 50000 --reporter list +--reporter mocha-junit-reporter --colors test/node/**/*.ts test/shared/**/*.ts