From 21f642a6f9f12c235fad31eb62bd7f7b60f0cbda Mon Sep 17 00:00:00 2001 From: Caleb Ukle Date: Wed, 31 May 2023 08:51:23 -0500 Subject: [PATCH] fix(testing): normalize path for react CT spec generator (#17221) --- packages/react/src/generators/component-test/component-test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react/src/generators/component-test/component-test.ts b/packages/react/src/generators/component-test/component-test.ts index aea81fa1bcad2..ae783e94b6378 100644 --- a/packages/react/src/generators/component-test/component-test.ts +++ b/packages/react/src/generators/component-test/component-test.ts @@ -26,6 +26,8 @@ export async function componentTestGenerator( '@nx/cypress/src/utils/cypress-version' ); assertMinimumCypressVersion(10); + // normalize any windows paths + options.componentPath = options.componentPath.replace(/\\/g, '/'); const projectConfig = readProjectConfiguration(tree, options.project);