Skip to content

Commit c0803ad

Browse files
committed
Properly escape error messages in interactive mode
1 parent 475f4ad commit c0803ad

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ All notable changes to this project will be documented in this file.
66

77
- Step hooks are logged using separate log groups, similar to how scenario hooks are logged.
88

9+
- Properly escape error messages in interactive mode.
10+
911
- Fix error in non-feature specs under certain conditions, fixes [#1028](https://github.com/badeball/cypress-cucumber-preprocessor/issues/1028).
1012

1113
- Allow doesFeatureMatch to be called in support files, fixes [#1025](https://github.com/badeball/cypress-cucumber-preprocessor/issues/1025).

lib/browser-runtime.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ function createMissingStepDefinitionMessage(
983983
: noStepDefinitionPathsTemplate;
984984

985985
const maybeEscape = (string: string) =>
986-
strictIsInteractive() ? string.replace("*", "\\*") : string;
986+
strictIsInteractive() ? string.replaceAll("*", "\\*") : string;
987987

988988
const prettyPrintList = (items: string[]) =>
989989
items.map((item) => " - " + maybeEscape(item)).join("\n");

0 commit comments

Comments
 (0)