Skip to content

Commit 9924d2d

Browse files
committed
Use isTextTerminal in the browser env
The property isInteractive was apparently removed in Cypress v15.4.0.
1 parent 6e5c56d commit 9924d2d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/browser-runtime.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,17 +1428,17 @@ type Tail<T extends any[]> = T extends [infer _A, ...infer R] ? R : never;
14281428

14291429
export type CreateTestsOptions = Tail<Parameters<typeof createTests>>;
14301430

1431-
function strictIsInteractive(): boolean {
1432-
const isInteractive = Cypress.config(
1433-
"isInteractive" as keyof Cypress.ConfigOptions,
1431+
function strictIsTextTerminal(): boolean {
1432+
const isTextTerminal = Cypress.config(
1433+
"isTextTerminal" as keyof Cypress.ConfigOptions,
14341434
);
14351435

1436-
if (typeof isInteractive === "boolean") {
1437-
return isInteractive;
1436+
if (typeof isTextTerminal === "boolean") {
1437+
return isTextTerminal;
14381438
}
14391439

14401440
throw new Error(
1441-
"Expected to find a Cypress configuration property `isInteractive`, but didn't",
1441+
"Expected to find a Cypress configuration property `isTextTerminal`, but didn't",
14421442
);
14431443
}
14441444

@@ -1495,7 +1495,7 @@ function createMissingStepDefinitionMessage(
14951495
: noStepDefinitionPathsTemplate;
14961496

14971497
const maybeEscape = (string: string) =>
1498-
strictIsInteractive() ? string.replaceAll("*", "\\*") : string;
1498+
strictIsTextTerminal() ? string : string.replaceAll("*", "\\*");
14991499

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

0 commit comments

Comments
 (0)