forked from uncch-rdmc/dataverse-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cypress.config.ts
42 lines (40 loc) · 1.27 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
import { defineConfig } from 'cypress'
import vitePreprocessor from 'cypress-vite'
import path from 'path'
export default defineConfig({
video: false,
e2e: {
baseUrl: 'http://localhost:8000',
specPattern: 'tests/e2e-integration/**/*.spec.{js,jsx,ts,tsx}',
fixturesFolder: 'tests/e2e-integration/fixtures',
screenshotOnRunFailure: false,
video: false,
viewportWidth: 1920,
viewportHeight: 1080,
supportFile: 'tests/support/e2e.ts',
setupNodeEvents(on) {
on('file:preprocessor', vitePreprocessor(path.resolve(__dirname, './vite.config.ts')))
},
defaultCommandTimeout: 10_000 // https://docs.cypress.io/guides/references/configuration#Timeouts
},
component: {
indexHtmlFile: 'tests/support/component-index.html',
specPattern: ['tests/component/**/*.spec.{js,jsx,ts,tsx}'],
supportFile: 'tests/support/component.ts',
fixturesFolder: 'tests/component/fixtures',
devServer: {
framework: 'react',
bundler: 'vite'
},
setupNodeEvents(on, config) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-var-requires
require('@cypress/code-coverage/task')(on, config)
return config
}
},
env: {
codeCoverage: {
exclude: 'tests/**/*.*'
}
}
})