tubearchivist-frontend/cypress.config.ts
Sean Norwood 2e213376e3
Initial
2022-10-18 14:28:37 -05:00

28 lines
704 B
TypeScript

import { defineConfig } from "cypress";
export default defineConfig({
e2e: {
setupNodeEvents: (on, config) => {
const isDev = config.watchForFileChanges;
const port = process.env.PORT ?? (isDev ? "3000" : "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 };
},
},
});