Closed phoefflin closed 3 months ago
It got broken by this commit: 61c733e8b576fe8353774ad6c87e23b5696dfb08
To find out, I used git bisect (with updated tests to include an additional line in the complex_background.feature).
Diff including the extra tests I used:
diff --git a/tests/good/__snapshots__/jsfmt.spec.mjs.snap b/tests/good/__snapshots__/jsfmt.spec.mjs.snap
index b88a206..55d55c8 100644
--- a/tests/good/__snapshots__/jsfmt.spec.mjs.snap
+++ b/tests/good/__snapshots__/jsfmt.spec.mjs.snap
@@ -57,6 +57,7 @@ Feature: Complex background
Background: a simple background
Given the minimalism inside a background
+ And another line inside a background
Scenario: minimalistic
Given the minimalism
@@ -85,6 +86,7 @@ Feature: Complex background
Background: a simple background
Given the minimalism inside a background
+ And another line inside a background
Scenario: minimalistic
Given the minimalism
@@ -115,6 +117,7 @@ Feature: Complex background
Background: a simple background
Given the minimalism inside a background
+ And another line inside a background
Scenario: minimalistic
Given the minimalism
diff --git a/tests/good/complex_background.feature b/tests/good/complex_background.feature
index fde7c94..71ba741 100644
--- a/tests/good/complex_background.feature
+++ b/tests/good/complex_background.feature
@@ -3,6 +3,7 @@ Feature: Complex background
Background: a simple background
Given the minimalism inside a background
+ And another line inside a background
Scenario: minimalistic
Given the minimalism
Sorry guys, I only saw that issue today !
Thanks @bdo for the deep dive.
The fix has been released in 2.4.1
Thank you Julien for producing the fix. We can now upgrade to the last version! 👏🥳
According to https://cucumber.io/docs/gherkin/reference/#background the
Background
can contain more than one Steps combined with the 'And' keyword. The plugin currently (that is v2.4.0) does not seem to handle 'And' correctly and instead reformats steps to only one line.Example input:
Output: