-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcypress.config.ts
44 lines (43 loc) · 1.3 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
import { defineConfig } from 'cypress'
import { devServer } from '@cypress/vite-dev-server'
import { ViteDevServerConfig } from '@cypress/vite-dev-server/dist/devServer'
import { setupNodeEvents } from './test/e2e/plugins'
import viteConfig from './vite.config'
export default defineConfig<ViteDevServerConfig>({
defaultCommandTimeout: 30000,
requestTimeout: 30000,
fileServerFolder: '.',
fixturesFolder: 'test/e2e/fixtures',
trashAssetsBeforeRuns: true,
viewportWidth: 1440,
viewportHeight: 990,
env: {
CYPRESS_COVERAGE: 'true',
TAGS: 'not @ignore',
BASE_URL: 'http://localhost:3000'
},
e2e: {
baseUrl: 'http://localhost:3000',
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents,
specPattern: 'test/e2e/specs/**/*.{feature,features}',
supportFile: 'test/e2e/support/index.ts',
excludeSpecPattern: ['*.{ts,tsx,js,jsx}']
},
component: {
devServer(config) {
return devServer({
...config,
framework: 'vue',
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
//@ts-ignore
viteConfig: {
...viteConfig
}
})
},
specPattern: 'test/**/*.{feature,features}',
excludeSpecPattern: ['*.{ts,tsx,js,jsx}']
}
})