Skip to content

Commit

Permalink
parameter type: duplicate regex (#780)
Browse files Browse the repository at this point in the history
  • Loading branch information
charlierudolph authored Mar 10, 2017
1 parent e4932f3 commit 201b082
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions features/parameter_types.feature
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,23 @@ Feature: Parameter types
"""
transform error
"""

Scenario: duplicate capture group regex
Given a file named "features/support/my_parameter_types.js" with:
"""
import {defineSupportCode} from 'cucumber'
defineSupportCode(({defineParameterType, When}) => {
defineParameterType({
regexp: /"[^"]+"/,
transformer: JSON.parse,
typeName: 'stringInDoubleQuotes2'
})
})
"""
When I run cucumber.js with `-f progress`
Then the output contains the text:
"""
There is already a parameter with regexp "[^"]+"
"""
And it fails

0 comments on commit 201b082

Please sign in to comment.