-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
cypress.config.ts
27 lines (26 loc) · 1013 Bytes
/
cypress.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { addCucumberPreprocessorPlugin } from '@badeball/cypress-cucumber-preprocessor';
// @ts-expect-error Cannot find module or its corresponding type declarations.
import { createEsbuildPlugin } from '@badeball/cypress-cucumber-preprocessor/esbuild';
// @ts-expect-error Module can only be default-imported using the 'esModuleInterop' flag
import createBundler from '@bahmutov/cypress-esbuild-preprocessor';
import { defineConfig } from 'cypress';
export default defineConfig({
e2e: {
specPattern: '**/*.feature',
async setupNodeEvents(
on: Cypress.PluginEvents,
config: Cypress.PluginConfigOptions,
): Promise<Cypress.PluginConfigOptions> {
// https://github.com/badeball/cypress-cucumber-preprocessor/blob/master/docs/quick-start.md
await addCucumberPreprocessorPlugin(on, config);
on(
'file:preprocessor',
createBundler({ plugins: [createEsbuildPlugin(config)] }),
);
return config;
},
},
retries: {
runMode: 3,
},
});