-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
cypress.config.js
37 lines (29 loc) · 879 Bytes
/
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
require('dotenv').config();
const { defineConfig } = require('cypress');
const vite = require('cypress-vite');
module.exports = defineConfig({
projectId: 'dkoa9n',
viewportWidth: 1920,
viewportHeight: 1080,
component: {
specPattern: 'src/**/*.spec.js',
devServer: {
framework: 'svelte',
bundler: 'vite',
},
},
e2e: {
specPattern: 'cypress/integration/**/*.spec.js',
setupNodeEvents(on, config) {
config.env = {
...config.env,
APP_TESTING_ENDPOINT: process.env.APP_TESTING_ENDPOINT,
};
if (!config.env.APP_TESTING_ENDPOINT) {
throw new Error('APP_TESTING_ENDPOINT variable is not defined.');
}
on('file:preprocessor', vite());
return config;
},
},
});