hiptest-publisher
hiptest-publisher copied to clipboard
Single quotes within steps aren't handled properly in Cucumber/TypeScript preset
Describe the bug When hiptest-publisher is used to generate Cucumber/TypeScript test stubs, single quotes aren't properly handled which results in syntax errors in the newly generated step_definitions file.
To Reproduce
- Have a feature file containing a step with a single quote inside e.g.
Then they're logged in
- Run hiptest-publisher with the config file containing
language = cucumber
framework = typescript
- Generated code uses single quotes for strings and doesn't escape the quotes within Gherkin steps.
Then('they're logged in', async () => {
actionWords.theyreLoggedIn();
});
Expected behavior Generated code doesn't contain syntax errors.
Context & Motivation It affected me deeply. Jk but it affected me enough to report the bug.
Your Environment
- hiptest-publisher version: 3.1.0