Skip to content

Commit

Permalink
fix(testing): resolve cypress config glob pattern correctly to handle…
Browse files Browse the repository at this point in the history
… root projects
  • Loading branch information
leosvelperez committed Mar 5, 2024
1 parent e78116d commit 9f88301
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/cypress/src/utils/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { glob, type Tree } from '@nx/devkit';
import { glob, joinPathFragments, type Tree } from '@nx/devkit';
import type {
InterfaceDeclaration,
MethodSignature,
Expand Down Expand Up @@ -168,7 +168,7 @@ export function getProjectCypressConfigPath(
projectRoot: string
): string {
const cypressConfigPaths = glob(tree, [
`${projectRoot}/${CYPRESS_CONFIG_FILE_NAME_PATTERN}`,
joinPathFragments(projectRoot, CYPRESS_CONFIG_FILE_NAME_PATTERN),
]);
if (cypressConfigPaths.length === 0) {
throw new Error(`Could not find a cypress config file in ${projectRoot}.`);
Expand Down

0 comments on commit 9f88301

Please sign in to comment.