Skip to content

Commit 7f4999b

Browse files
authored
add error_message for steps that have the status pending (#2393)
1 parent 5df8971 commit 7f4999b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
88
Please see [CONTRIBUTING.md](./CONTRIBUTING.md) on how to contribute to Cucumber.
99

1010
## [Unreleased]
11+
- Add error message for pending steps ([#2392](https://github.com/cucumber/cucumber-js/pull/2393))
1112

1213
## [10.4.0] - 2024-04-07
1314
### Added

src/runtime/step_runner.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,15 @@ export async function run({
6868
} else if (result === 'pending') {
6969
status = messages.TestStepResultStatus.PENDING
7070
} else if (doesHaveValue(error)) {
71-
details = formatError(error, filterStackTraces)
7271
status = messages.TestStepResultStatus.FAILED
7372
} else {
7473
status = messages.TestStepResultStatus.PASSED
7574
}
7675

76+
if (doesHaveValue(error)) {
77+
details = formatError(error, filterStackTraces)
78+
}
79+
7780
return {
7881
duration,
7982
status,

0 commit comments

Comments
 (0)