Skip to content

Commit b3167a9

Browse files
author
Danny McCormick
committed
Set up multi-reporter
1 parent 373dbd0 commit b3167a9

File tree

3 files changed

+39
-28
lines changed

3 files changed

+39
-28
lines changed

azure-pipelines-template.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,13 @@ steps:
77
- script: npm install
88
displayName: 'npm install'
99

10-
- script: npm install -g mocha
11-
displayName: 'Install mocha'
12-
13-
- script: npm install -g mocha-junit-reporter
14-
displayName: 'Install mocha junit reporter'
15-
1610
- script: npm run build
1711
displayName: 'Build'
1812

19-
- script: mocha tests/test.js --reporter mocha-junit-reporter
13+
- script: npm run test
2014
displayName: 'Test'
2115

2216
- task: PublishTestResults@2
2317
inputs:
24-
testResultsFiles: '**/test-results.xml'
18+
testResultsFiles: '**/xunit.xml'
2519
condition: succeededOrFailed()

package-lock.json

Lines changed: 34 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"build:grammar": "tsc -b build -v && node build/build.js",
1010
"build:tests": "tsc -b tests -v",
1111
"pretest": "npm run build",
12-
"test": "mocha --full-trace tests/test.js",
12+
"test": "mocha --full-trace tests/test.js --reporter mocha-multi-reporters",
1313
"diff": "cross-env-shell $DIFF tests/baselines tests/generated",
1414
"accept": "cpx tests/generated/* tests/baselines"
1515
},
@@ -27,6 +27,7 @@
2727
},
2828
"devDependencies": {
2929
"cpx": "^1.5.0",
30-
"cross-env": "^5.1.1"
30+
"cross-env": "^5.1.1",
31+
"mocha-multi-reporters": "^1.1.7"
3132
}
3233
}

0 commit comments

Comments
 (0)