You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could not find related issues about escaping special characters in the error output.
I'm only parsing features and step defs (no tests are yet implemented), so definitely cucumber-js.
This is a bug report. Version Info and steps to reproduce follow.
Version Info
$ node -v
v12.10.0
$ npm ls cucumber
[email protected] /Users/xxxx/projects/obfuscated-package
└── [email protected]
$ set | grep OSTYPE
OSTYPE=darwin19.3.0
(macOS Catalina 10.15.5)
$ bash --version
GNU bash, version 5.0.16(1)-release (x86_64-apple-darwin19.3.0)
(installed with Homebrew)
Steps to reproduce
I'm going from BDD to code. The first step when adding new features is to identify the step defs. I do this by running cucumber, then script-processing the output to extract the missing fragments into stepdef files.
A typical missing step def results in an error like this:
? When the user (with permissions) executes the action
Undefined. Implement with the following snippet:
When('the user \(with permissions) executes the action', function () {
// Write code here that turns the phrase above into concrete actions
return 'pending';
});
After I run my script to extract the snippets, I have a stepdef file with the snippet contents:
const assert = require('assert');
const { Given, When, Then } = require('cucumber');
When('the user \(with permissions) executes the action', function () {
// Write code here that turns the phrase above into concrete actions
return 'pending';
});
But running cucumber again still reports the Undefined stepdef.
## Workaround
My script replaces the '\' with '\\', but the suggestion output should be correct, and not open to interpretation.
Prerequisite Due Diligence
Version Info
Steps to reproduce
I'm going from BDD to code. The first step when adding new features is to identify the step defs. I do this by running cucumber, then script-processing the output to extract the missing fragments into stepdef files.
A typical missing step def results in an error like this:
After I run my script to extract the snippets, I have a stepdef file with the snippet contents:
But running cucumber again still reports the Undefined stepdef.
## Workaround
My script replaces the '
\
' with '\\
', but the suggestion output should be correct, and not open to interpretation.I tracked it down to https://github.com/cucumber/cucumber-js/tree/master/src/formatter/step_definition_snippet_builder before getting lost in the multi-project structure...
The text was updated successfully, but these errors were encountered: