-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
cypress.config.mjs
48 lines (41 loc) · 1.26 KB
/
cypress.config.mjs
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
import { defineConfig } from 'cypress'
import fs from 'fs'
import codeCoverageTask from '@cypress/code-coverage/task.js'
export default defineConfig({
video: false,
defaultCommandTimeout: 10000,
pageLoadTimeout: 120000,
includeShadowDom: true,
scrollBehavior: false,
viewportWidth: 2048,
viewportHeight: 2048,
e2e: {
testIsolation: false,
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents (on, config) {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
// https://docs.cypress.io/guides/tooling/code-coverage.html#Install-the-plugin
codeCoverageTask(on, config)
on('task', {
readFileMaybe (filename) {
if (fs.existsSync(filename)) {
return fs.readFileSync(filename, 'utf8')
}
return null
}
})
return config
},
env: {
codeCoverage: {
exclude: 'cypress/**/*.*'
}
},
baseUrl: 'http://localhost:8000',
excludeSpecPattern: ['**/__snapshots__/*', '**/__image_snapshots__/*']
}
})