-
Notifications
You must be signed in to change notification settings - Fork 2
/
cypress.config.ts
53 lines (51 loc) · 1.33 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import {defineConfig} from 'cypress'
import plugins from './cypress/support/plugins'
import tasks from './cypress/support/tasks'
import esbuildPreprocessor from './cypress/support/esbuild-preprocessor'
import viteConfig from './vite.config'
import {mergeConfig} from 'vite'
import {CypressEsm} from '@cypress/vite-plugin-cypress-esm'
export default defineConfig({
projectId: 'x953wq',
// @ts-expect-error - experimentalSingleTabRunMode is not in the type definition
experimentalSingleTabRunMode: true,
retries: {
runMode: 2,
openMode: 0,
},
env: {
API_URL: 'http://localhost:4000/api',
coverage: {
quiet: true,
},
},
e2e: {
specPattern: 'cypress/e2e/**/*.cy.{js,jsx,ts,tsx}',
baseUrl: 'http://localhost:3000',
setupNodeEvents(on, config) {
esbuildPreprocessor(on) // no need with vite
tasks(on)
return plugins(on, config)
},
},
component: {
experimentalJustInTimeCompile: true,
setupNodeEvents(on, config) {
tasks(on)
return plugins(on, config)
},
specPattern: 'src/**/*.cy.{js,jsx,ts,tsx}',
devServer: {
framework: 'react',
bundler: 'vite',
viteConfig: () =>
mergeConfig(viteConfig, {
plugins: [
CypressEsm({
ignoreList: ['*react*'],
}),
],
}),
},
},
})