Skip to content

Commit ee538bd

Browse files
hyndingdavidjgoss
andauthored
Handle UNKNOWN status when rendering test run outcome (#2441)
* added unknown status for summary message * spec total count updated * match order from messages * changelog and attribution --------- Co-authored-by: David Goss <[email protected]>
1 parent 1c4d9c5 commit ee538bd

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ Please see [CONTRIBUTING.md](./CONTRIBUTING.md) on how to contribute to Cucumber
1414
### Changed
1515
- Replace JUnit formatter with messages-based package ([#2445](https://github.com/cucumber/cucumber-js/pull/2445))
1616

17+
### Fixed
18+
- Handle UNKNOWN status when rendering test run outcome ([#2441](https://github.com/cucumber/cucumber-js/pull/2441))
19+
1720
## [11.0.1] - 2024-09-14
1821
### Fixed
1922
- Add missing setParallelCanAssign export ([#2427](https://github.com/cucumber/cucumber-js/pull/2427))

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@
157157
"Simon Lampen <[email protected]>",
158158
"Sonny Piers <[email protected]>",
159159
"Stanley Shyiko <[email protected]>",
160+
"Steve Hynding (https://github.com/hynding)",
160161
"Steve Tooke <[email protected]>",
161162
"szymonprz <[email protected]>",
162163
"Ted de Koning",

src/formatter/helpers/summary_helpers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const STATUS_REPORT_ORDER = [
1111
messages.TestStepResultStatus.PENDING,
1212
messages.TestStepResultStatus.SKIPPED,
1313
messages.TestStepResultStatus.PASSED,
14+
messages.TestStepResultStatus.UNKNOWN,
1415
]
1516

1617
export interface IFormatSummaryRequest {

src/formatter/helpers/summary_helpers_spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,16 @@ describe('SummaryHelpers', () => {
217217
' Given a skipped step',
218218
' Scenario: a6',
219219
' Given an undefined step',
220+
// an unknown scenario
221+
' Scenario:',
220222
].join('\n')
221223

222224
// Act
223225
const output = await testFormatSummary({ sourceData })
224226

225227
// Assert
226228
expect(output).to.contain(
227-
'6 scenarios (1 failed, 1 ambiguous, 1 undefined, 1 pending, 1 skipped, 1 passed)\n' +
229+
'7 scenarios (1 failed, 1 ambiguous, 1 undefined, 1 pending, 1 skipped, 1 passed, 1 unknown)\n' +
228230
'6 steps (1 failed, 1 ambiguous, 1 undefined, 1 pending, 1 skipped, 1 passed)\n' +
229231
'0m00.000s (executing steps: 0m00.000s)\n'
230232
)

0 commit comments

Comments
 (0)