-
-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
👓 What did you see?
If a step definition requires escaping some characters, the current behavior is a little off (at least in JavaScript):
If I use one backslash character:
- In the feature file, the step is linked to its definition, and highlighting and go to step definition are working
- In the step definition file, ESLint complains about an unnecessary escape character
- Test fails with an error that the step is not defined
If I use two backslash characters:
- In the feature file, the step is not linked to its definition, and shows the undefined step warning
- In the step definition file, ESLint no longer complains
- Test passes
✅ What did you expect to see?
If using a single backslash character: undefined step warning
If using two backslash characters: highlighting and go to step definition
📦 Which tool/library version are you using?
- Node.js v22.17.0
@wdio/cucumber-frameworkv9.19.1 (@cucumber/cucumberv10.9.0)
🔬 How could we reproduce it?
Create a feature file:
Feature: My Feature
Scenario: Escaping Test
Given I have (re)registered an account for "my@test.acc"Create a step definition file:
import { Given } from "@wdio/cucumber-framework";
// import { Given } from "@cucumber/cucumber"; // this also works
Given("I have \\(re)registered an account for {string}", async (name: string) => {
console.log(name);
});Use either one or two backslashes in the step definition file, and observe the behavior in the feature file.
📚 Any additional context?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

