Skip to content

Commit

Permalink
Preserve trailing comments after feature. Fixes #38 partially.
Browse files Browse the repository at this point in the history
  • Loading branch information
xeger committed Oct 14, 2023
1 parent 940d31f commit 2045072
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions javascript/test/prettyTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,6 @@ Feature: hello
`)
})

it('renders trailing comments', () => {
checkGherkinToAstToGherkin(`# one
Feature: hello
# two
# three
`)
})

it('renders just comments', () => {
checkGherkinToAstToGherkin(`# one
# two
Expand Down Expand Up @@ -208,6 +200,24 @@ Scenario: Atlas
`)
})

it('renders trailing comments', () => {
checkGherkinToAstToGherkin(`# one
Feature: hello
Scenario: one
# one
Given a doc string:
"""
a
\\"\\"\\"
b
"""
# two
# three
# four
`)
});

it('renders descriptions when set', () => {
checkGherkinToAstToGherkin(`Feature: hello
So this is a feature
Expand Down

0 comments on commit 2045072

Please sign in to comment.