-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcypress.config.mjs
44 lines (40 loc) · 1.17 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
import { defineConfig } from 'cypress';
// import coverageTask from '@cypress/code-coverage/task.js';
import dotenv from 'dotenv';
import vitePreprocessor from 'cypress-vite';
dotenv.config();
export default defineConfig({
e2e: {
baseUrl: 'http://localhost/',
experimentalRunAllSpecs: true,
trashAssetsBeforeRuns: true,
setupNodeEvents(on, config) {
on('file:preprocessor', vitePreprocessor());
// coverageTask(on, config);
// return config;
},
},
video: true,
screenshotsFolder: 'cypress/screenshots',
videosFolder: 'cypress/videos',
component: {
devServer: {
framework: 'react',
bundler: 'vite',
},
supportFile: 'cypress/support/component.jsx',
specPattern: 'src/**/*.cy.{js,jsx,ts,tsx}', // Specify the path to your component tests
numTestsKeptInMemory: 1,
experimentalMemoryManagement: true,
setupNodeEvents(on, config) {
// coverageTask(on, config);
// return config;
},
},
defaultCommandTimeout: 30000,
env: {
auth0_username: process.env.VITE_AUTH0_USERNAME,
auth0_password: process.env.VITE_AUTH0_PASSWORD,
auth0_domain: process.env.VITE_API_AUTH0_DOMAIN,
},
});