Skip to content

Commit 5a8a6d5

Browse files
author
bruno-morel
committed
fix(basic): Non-outline expression bracket-enclosed (<>) with multiple words separated by a space break the matching of scenario and step definitions.
Fixes #2
1 parent 5d54bc2 commit 5a8a6d5

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

test/specs/features/basic-scenarios.feature

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,17 @@ Feature: Rocket Launching
66
Then the rocket should end up in space
77
And the booster(s) should land back on the launch pad
88
But nobody should doubt me ever again
9+
10+
Scenario: Launching my ASCII rocket
11+
Given I am Elon Musk attempting to launch a rocket into space
12+
When I launch the '<rocket>'
13+
Then the rocket should end up in space
14+
And the booster(s) should land back on the launch pad
15+
But nobody should doubt me ever again
16+
17+
Scenario: Launching my personal ASCII rocket
18+
Given I am Elon Musk attempting to launch a rocket into space
19+
When I launch my personal rocket named '<space poney==>'
20+
Then the rocket should end up in space
21+
And the booster(s) should land back on the launch pad
22+
But nobody should doubt me ever again

test/specs/features/step-definitions/basic-scenarios.steps.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ When( 'I launch the rocket', () => {
1212
rocket.launch()
1313
} )
1414

15+
16+
When( 'I launch the \'<rocket>\'', () => {
17+
rocket.launch()
18+
} )
19+
20+
When( /^I launch my personal rocket named '(.*)'$/, function ( nameRocket ) {
21+
expect( nameRocket ).toBeDefined()
22+
rocket.launch()
23+
} );
24+
1525
Then( 'the rocket should end up in space', () => {
1626
expect(rocket.isInSpace).toBe(true)
1727
} )

0 commit comments

Comments
 (0)