Skip to content

Commit

Permalink
add error_message for steps that have the status pending (#2393)
Browse files Browse the repository at this point in the history
  • Loading branch information
markstein committed Apr 21, 2024
1 parent 5df8971 commit 7f4999b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
Please see [CONTRIBUTING.md](./CONTRIBUTING.md) on how to contribute to Cucumber.

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

## [10.4.0] - 2024-04-07
### Added
Expand Down
5 changes: 4 additions & 1 deletion src/runtime/step_runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,15 @@ export async function run({
} else if (result === 'pending') {
status = messages.TestStepResultStatus.PENDING
} else if (doesHaveValue(error)) {
details = formatError(error, filterStackTraces)
status = messages.TestStepResultStatus.FAILED
} else {
status = messages.TestStepResultStatus.PASSED
}

if (doesHaveValue(error)) {
details = formatError(error, filterStackTraces)
}

return {
duration,
status,
Expand Down

0 comments on commit 7f4999b

Please sign in to comment.