-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Add tap-xunit and flatten results for junit output
This change tests `tap-xunit` as a way to generate a junit report. `tap-xunit` does not parse failures on subtests properly, so flatten them in order to see the full failure details which are important. The `tap-mocha-reporter`, which we normally use, does not properly include the failure details, so `tap-xunit` is a viable replacement. Semver: patch
- Loading branch information
1 parent
8a5027a
commit 192f4c1
Showing
3 changed files
with
24 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
export PATH="./node_modules/.bin:$PATH" | ||
|
||
mkdir -p coverage | ||
|
||
npm run test | ||
|
||
code=$? | ||
|
||
# tap-mocha-reporter is buggy and does not include all test results. Use tap-xunit, | ||
# however it has a bug with subtests as well. @isaacs has offered a solution | ||
# by flattening: https://github.com/aghassemi/tap-xunit/issues/23#issuecomment-520480836 | ||
|
||
cat coverage/.tap-output | tap-parser -t -f | tap-xunit > coverage/test.xml | ||
|
||
exit $code |