Reputation: 35
Can I have *.feature
and *.cy.ts
tests run in the same repository ?
how should my cypress.config.ts look like? they get listed in E2E specs with current
specPattern: 'cypress/e2e/**/*.feature|cypress/e2e/**/*.cy.ts',
listing both, but all fails to execute, expected at least the .feature files to execute properly
specPattern: 'cypress/e2e/**/*.feature',
works fine but still I need to have *.cy.ts listed and executed properly with cypress
e2e: {
async setupNodeEvents(on, config) {
const bundler = createBundler({
plugins: [createEsbuildPlugin(config)],
});
on('file:preprocessor', bundler);
await addCucumberPreprocessorPlugin(on, config);
return config;
},
specPattern: 'cypress/e2e/**/*.feature|cypress/e2e/**/*.cy.ts',
},
Upvotes: 3
Views: 655
Reputation: 10550
The specPattern
option can be an array, so you can try this
specPattern: ['cypress/e2e/**/*.feature', 'cypress/e2e/**/*.cy.ts'],
The logic is applied in an OR pattern.
Upvotes: 6