With a feature containing a Scenario Outline and an Example table like:
Feature: Demonstrate Issue
Scenario Outline: Parameters with spaces don't match
Given a variable containing <var>
Examples:
| var |
| No_Spaces |
| Some Spaces |
I'm struggling to match the <var>
in my steps using cucumber expression with cucumberjs.
I know that the {string}
parameter type requires double quotes rather than the angular brackets, but I expected the anonymous type to match:
Given('a variable containing {}', function(expectedVar) {
return true;
});
But it doesn't.
I know I can use the regex option:
Given(/^a variable containing (.*)$/, function(expectedVar) {
return true;
});
I would just like to know where I'm going wrong in my use of the anonymous parameter type.