Skip to content

Commit 8cc6d83

Browse files
authored
Merge pull request #40 from dhershman1/development
Development v5.0.1
2 parents 1bb21db + 1dd73fd commit 8cc6d83

File tree

6 files changed

+32
-8
lines changed

6 files changed

+32
-8
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[![CircleCI](https://circleci.com/gh/dhershman1/tap-junit.svg?style=svg)](https://circleci.com/gh/dhershman1/tap-junit)
22
[![npm](https://img.shields.io/npm/v/tap-junit.svg?style=flat-square)](https://www.npmjs.com/package/tap-junit)
33
[![Downloads](https://img.shields.io/npm/dm/tap-junit.svg?style=flat-square)](https://www.npmjs.com/package/tap-junit)
4+
[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/dhershman1/tap-junit.svg?style=flat-square&logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/dhershman1/tap-junit/context:javascript)
45

56
# tap-junit
67

changelog.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
## v5.0.1
4+
5+
### Added
6+
7+
- Language Grade
8+
9+
### Fixed
10+
11+
- Error/Failure messaging returning `undefined` becuase it was preferring todo instead of message, which might not exist. [#39](https://github.com/dhershman1/tap-junit/issues/39)
12+
13+
314
## v5.0.0
415

516
Please report any issues or serliazation that does not follow the below spec for output! Thanks!

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tap-junit",
3-
"version": "5.0.0",
3+
"version": "5.0.1",
44
"description": "Silly small, silly easy junit output formatter for tap.",
55
"main": "src/index.js",
66
"bin": {
@@ -21,6 +21,7 @@
2121
"test:tapx": "cross-env bin/tap-junit -i tests/tapX.tap -o output/test -n tapx",
2222
"test:bat": "cross-env bin/tap-junit -i tests/bats-1.0.0.txt -o output/test -n bat -p",
2323
"test:basic": "cross-env bin/tap-junit -i tests/basic.tap -o output/test -n basic -p",
24+
"test:basic2": "cross-env bin/tap-junit -i tests/basic2.tap -o output/test -n basic2 -p",
2425
"all": "npm-run-all clear test test:* ci:*",
2526
"ci": "npm-run-all clear test ci:*",
2627
"test:fail": "tape tests/fail.js | cross-env bin/tap-junit --output output/test -n failure -p",

src/serialize.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,11 @@ function buildFailureParams (fail) {
4343
}
4444

4545
if (fail.diag) {
46-
failObj['@message'] = fail.diag.message || fail.todo
47-
? `${fail.todo}`
48-
: `
49-
---
50-
${formatDiag(fail.diag)}
51-
...`
46+
if (fail.todo) {
47+
failObj['@message'] = fail.todo
48+
} else {
49+
failObj['@message'] = fail.diag.message || formatDiag(fail.diag)
50+
}
5251
failObj['@type'] = fail.diag.severity || 'fail'
5352
}
5453

tests/basic2.tap

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
TAP version 13
2+
1..4
3+
not ok 1 - Manual/about.md
4+
---
5+
message: /tmp/lint/Manual/about.md 9 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context "# About this manual"]
6+
...
7+
ok 2 - Manual/welcome.md
8+
ok 3 - Media/README.md
9+
not ok 4 - README.md
10+
---
11+
message: /tmp/lint/README.md 4 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context "# Getting Started"]\n/tmp/lint/README.md 11 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context "# Build and Test"]\n/tmp/lint/README.md 17 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context "# Contribute"]
12+
...

0 commit comments

Comments
 (0)