generated from jirihofman/nextjs-fullstack-app-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cypress.config.js
47 lines (45 loc) · 1.32 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
import { defineConfig } from 'cypress';
import codeCoverageTask from '@cypress/code-coverage/task';
const config = defineConfig({
chromeWebSecurity: false,
component: {
devServer: {
bundler: 'webpack',
framework: 'next',
},
setupNodeEvents(on, config) {
codeCoverageTask(on, config);
return config;
},
specPattern: 'components/**/*.cy.{js,jsx,ts,tsx}',
},
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
baseUrl: 'http://localhost:3000',
setupNodeEvents(on, config) {
require('@cypress/code-coverage/task')(on, config);
// IMPORTANT to return the config object
// with the any changed environment variables
return config;
},
specPattern: 'cypress/test/**/*.*',
},
env: {
codeCoverage: {
exclude: 'cypress/**/*.*',
url: '/api/__coverage__',
},
coverage: false,
},
fixturesFolder: 'cypress/fixtures',
reporter: 'junit',
retries: {
openMode: 0,
runMode: 1,
},
screenshotsFolder: 'cypress/screenshots',
videosFolder: 'cypress/videos',
videoUploadOnPasses: false,
});
export default config;