-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcypress.config.js
47 lines (40 loc) · 1.02 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
const WDS = require('@cypress/webpack-dev-server');
const { defineConfig } = require('cypress');
const { createWebpackDevConfig } = require('@craco/craco');
module.exports = defineConfig({
pageLoadTimeout: 180000,
numTestsKeptInMemory: 0,
reporterOptions: {
toConsole: true,
},
env: {
API_GATEWAY_BASE: 'https://development.services.com',
DEV_SERVER_PORT: 3000,
},
e2e: {
experimentalRunAllSpecs: true,
excludeSpecPattern: [
'**/energy_simulation/**',
'**/debug/**.js',
'**/_common/**',
],
},
component: {
devServer(devServerConfig) {
process.env.NODE_ENV = 'development'
const cracoConfigFile = require('./craco.config.js');
const cracoConfig = createWebpackDevConfig({
...cracoConfigFile,
webpack: {
...cracoConfigFile.webpack,
devtool: 'eval-source-map',
},
});
return WDS.default({
...devServerConfig,
framework: 'react',
webpackConfig: cracoConfig,
});
},
},
});