In Cucumber JS, the following step is a valid one:
When I pass in the number 10
with the step definition being:
When('I pass in the number (\d*)', function(value) { ...
In the absence of double quotes in the step declaration, the capture group (\d*) resolves to a number and so the value argument should be.
Strangely, cucumber-js-tsflow, resolves value to a string instead, even if the number 10 in the example is not enclosed in quotes.
This is breaking the behaviour of existing test code when migrating from Cucumber JS to this package.
In Cucumber JS, the following step is a valid one:
When I pass in the number 10
with the step definition being:
When('I pass in the number (\d*)', function(value) { ...
In the absence of double quotes in the step declaration, the capture group
(\d*)
resolves to a number and so thevalue
argument should be.Strangely, cucumber-js-tsflow, resolves
value
to a string instead, even if the number 10 in the example is not enclosed in quotes. This is breaking the behaviour of existing test code when migrating from Cucumber JS to this package.