From 84c04bbd1bcd89c72b052d469e00fb3489590fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Teixeira?= Date: Wed, 3 Apr 2024 21:18:46 +0100 Subject: [PATCH] fix: --spec arg now allows () in filename (https://github.com/cypress-io/cypress/issues/28509) --- cli/CHANGELOG.md | 1 + cli/lib/exec/run.js | 1 + 2 files changed, 2 insertions(+) diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index 64344c1f3210..48a5f6573753 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -6,6 +6,7 @@ _Released 4/16/2024 (PENDING)_ **Misc:** - Updated the Chrome flags to not show the "Enhanced Ad Privacy" dialog. Addresses [#29199](https://github.com/cypress-io/cypress/issues/29199). +- Specs with () in the filename will no longer fail to load and now behave as any other spec. Fixes [#28509](https://github.com/cypress-io/cypress/issues/28509) ## 13.7.2 diff --git a/cli/lib/exec/run.js b/cli/lib/exec/run.js index 965e2f9fe975..495b675939b3 100644 --- a/cli/lib/exec/run.js +++ b/cli/lib/exec/run.js @@ -139,6 +139,7 @@ const processRunOptions = (options = {}) => { // if we have specific spec(s) push that into the args if (options.spec) { + options.spec = options.spec.replace(/[()]/g, '\\$&') args.push('--spec', options.spec) }