-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcypress.config.js
40 lines (37 loc) · 1.09 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
const fetch = require('node-fetch');
const { defineConfig } = require('cypress');
module.exports = defineConfig({
viewportHeight: 720,
viewportWidth: 1280,
chromeWebSecurity: false,
experimentalInteractiveRunEvents: true,
component: {
specPattern: 'ext/**/*.cy.js',
devServer: {
framework: 'svelte',
bundler: 'vite',
},
setupNodeEvents(on, config) {
require('./cypress-node-events')(on);
// Shutdown the server after `yarn cypress run --component completes
// This ensures that c8 outputs the lcov.info file properly
on('after:run', () => {
return fetch('http://localhost:9000/shutdown');
});
return config;
},
},
e2e: {
video: true,
baseUrl: 'http://localhost:8080',
setupNodeEvents(on, config) {
require('./cypress-node-events')(on);
// Shutdown the server after `yarn cypress run --component completes
// This ensures that c8 outputs the lcov.info file properly
on('after:run', () => {
return fetch('http://localhost:9000/shutdown');
});
return config;
},
},
});