Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(testing): only target files in src/* directory for component testing #13604

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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