/* eslint-disable global-require */ // eslint-disable-next-line import/no-extraneous-dependencies const { defineConfig } = require('cypress') module.exports = defineConfig({ numTestsKeptInMemory: 15, defaultCommandTimeout: 15000, env: { apiUrl: 'https://api.realworld.io/api', oldApiUrl: 'https://conduit.productionready.io/api', device: 'desktop', email: 'test@test.com', password: 'Cypress123' }, retries: { runMode: 1, openMode: 0 }, userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36', viewportHeight: 768, viewportWidth: 1266, e2e: { // We've imported your old cypress plugins here. // You may want to clean this up later by importing these. setupNodeEvents: function (on, config) { return require('./cypress/plugins/index.js')(on, config) }, baseUrl: 'http://angularjs.realworld.io/#' } }) const { lighthouse, prepareAudit } = require("@cypress-audit/lighthouse"); // const { pa11y } = require("@cypress-audit/pa11y"); module.exports = { e2e: { baseUrl: "http://bstackdemo.com", // this is your app setupNodeEvents(on, config) { on("before:browser:launch", (browser = {}, launchOptions) => { prepareAudit(launchOptions); }); on("task", { lighthouse: lighthouse(), // pa11y: pa11y(console.log.bind(console)), }); }, }, };