Skip to content

Commit

Permalink
Implement fixes on output capturing from hotfix-v4 branch (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
joac committed Mar 22, 2023
1 parent ff6edd6 commit 38e5e79
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
11 changes: 4 additions & 7 deletions features/output.feature
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ Scenario: Capture enabled and suppression disabled
"""
.logged-on-initial-context-stdout
.Hello world
......logged-on-initial-context-stdout
.....logged-on-initial-context-stdout
.Hello world
..F..
..F.
Failures:
Expand All @@ -91,7 +91,6 @@ Scenario: Capture enabled and suppression disabled
Hello world
✔ After
✔ After
2 scenarios (1 failed, 1 passed)
6 steps (1 failed, 5 passed)
Expand All @@ -110,7 +109,7 @@ Scenario: Capture enabled and suppression enabled
When the suite is executed
Then stdout contains
"""
...........F..
..........F.
Failures:
Expand All @@ -136,7 +135,6 @@ Scenario: Capture enabled and suppression enabled
Hello world
✔ After
✔ After
2 scenarios (1 failed, 1 passed)
6 steps (1 failed, 5 passed)
Expand All @@ -150,7 +148,7 @@ Scenario: Capture disabled and suppression enabled
When the suite is executed
Then stdout contains
"""
...........F..
..........F.
Failures:
Expand All @@ -162,7 +160,6 @@ Scenario: Capture disabled and suppression enabled
✖ Then error
Error: Error
✔ After
✔ After
2 scenarios (1 failed, 1 passed)
6 steps (1 failed, 5 passed)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pickled-cucumber",
"version": "6.1.1",
"version": "6.1.2",
"description": "Cucumber test runner with several condiments",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
10 changes: 2 additions & 8 deletions src/output.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import {
After,
AfterStep,
Before,
BeforeStep,
Status,
} from '@cucumber/cucumber';
import { AfterStep, Before, BeforeStep, Status } from '@cucumber/cucumber';
import {
AfterInitialContext,
AfterTeardown,
Expand Down Expand Up @@ -95,7 +89,7 @@ export const setupOutputCapture = (
AfterTeardown(restore);
AfterStep(restore);

After(({ result }) => {
AfterStep(({ result }) => {
if (capture && result && result.status === Status.FAILED) {
result.message += [
'',
Expand Down

0 comments on commit 38e5e79

Please sign in to comment.