Skip to content

Commit

Permalink
fix(testing): only target files in src/* directory for component test…
Browse files Browse the repository at this point in the history
…ing (#13604)
  • Loading branch information
barbados-clemens committed Dec 5, 2022
1 parent 76536fd commit ddc2dca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/angular/plugins/component-testing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ ${e.stack ? e.stack : e}`
return {
...nxBaseCypressPreset(pathToConfig),
// NOTE: cannot use a glob pattern since it will break cypress generated tsconfig.
specPattern: ['**/*.cy.ts', '**/*.cy.js'],
specPattern: ['src/**/*.cy.ts', 'src/**/*.cy.js'],
devServer: {
// cypress uses string union type,
// need to use const to prevent typing to string
Expand Down
1 change: 1 addition & 0 deletions packages/react/plugins/component-testing/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export function nxComponentTestingPreset(
}
return {
...nxBaseCypressPreset(pathToConfig),
specPattern: 'src/**/*.cy.{js,jsx,ts,tsx}',
devServer: {
// cypress uses string union type,
// need to use const to prevent typing to string
Expand Down

0 comments on commit ddc2dca

Please sign in to comment.