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

This commit is contained in:
Caleb Ukle 2022-12-05 09:10:45 -06:00 committed by GitHub
parent 76536fda60
commit ddc2dca30d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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