forked from ohcnetwork/care_fe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cypress.config.ts
41 lines (34 loc) · 958 Bytes
/
cypress.config.ts
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
import { defineConfig } from "cypress";
import cypressSplit from "cypress-split";
import * as dotenv from "dotenv";
import fs from "fs";
dotenv.config();
export default defineConfig({
projectId: "wf7d2m",
defaultCommandTimeout: 10000,
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
require("cypress-localstorage-commands/plugin")(on, config); // eslint-disable-line
on("task", {
readFileMaybe(filename) {
if (fs.existsSync(filename)) {
return fs.readFileSync(filename, "utf8");
}
return null;
},
});
if (process.env.CYPRESS_SPLIT_TESTS === "true") {
cypressSplit(on, config);
}
return config;
},
baseUrl: "http://localhost:4000",
retries: 2,
requestTimeout: 15000,
},
env: {
API_URL: process.env.REACT_CARE_API_URL,
ENABLE_HCX: process.env.REACT_ENABLE_HCX ?? false,
},
});