-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcypress.config.ts
More file actions
27 lines (23 loc) · 829 Bytes
/
cypress.config.ts
File metadata and controls
27 lines (23 loc) · 829 Bytes
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
import { defineConfig } from "cypress";
export default defineConfig({
e2e: {
setupNodeEvents: (on, config) => {
const isDev = config.watchForFileChanges;
const port = process.env.PORT ?? (isDev ? "3001" : "8811");
const configOverrides: Partial<Cypress.PluginConfigOptions> = {
baseUrl: `http://localhost:${port}`,
video: !process.env.CI,
screenshotOnRunFailure: !process.env.CI
};
// To use this:
// cy.task('log', whateverYouWantInTheTerminal)
on("task", {
log: (message) => {
console.log(message);
return null;
},
});
return { ...config, ...configOverrides };
},
},
});