-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcypress.config.js
62 lines (59 loc) · 1.47 KB
/
cypress.config.js
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
54
55
56
57
58
59
60
61
62
import { resolve, dirname } from 'node:path'
import { fileURLToPath } from 'node:url'
import vue from '@vitejs/plugin-vue'
import { defineConfig } from 'cypress'
import codeCoverageTask from '@cypress/code-coverage/task'
import istanbul from 'vite-plugin-istanbul'
const __dirname = dirname(fileURLToPath(import.meta.url))
export default defineConfig({
video: false,
numTestsKeptInMemory: 0,
experimentalMemoryManagement: true,
retries: {
runMode: 1,
openMode: 0,
},
e2e: {
// setupNodeEvents(on, config) {},
},
component: {
devServer: {
framework: 'vue',
bundler: 'vite',
viteConfig: {
logLevel: 'silent',
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
'@module': resolve(__dirname, 'node_modules'),
vue: resolve(
__dirname,
'node_modules',
'vue',
'dist',
'vue.esm-bundler.js',
),
},
},
build: {
sourcemap: true,
},
plugins: [
vue(),
istanbul({
include: 'src/*',
exclude: ['node_modules', 'cypress', '**/*.fixtures.js'],
extension: ['.js', '.ts', '.vue'],
requireEnv: false,
}),
],
},
},
setupNodeEvents(on, config) {
codeCoverageTask(on, config)
return config
},
port: 3030,
specPattern: 'src/components/**/*.test.js',
},
})