victorious-summer-2999
11/29/2022, 11:09 AMpackages/e2e/cypress/config/configFiles/cypress-desk.config.ts
import { defineConfig } from 'cypress';
export default defineConfig({
e2e: {
experimentalSessionAndOrigin: true,
experimentalRunAllSpecs: true,
setupNodeEvents(on, config) {
const pluginFile = require('../../plugins/index.ts');
require('@cypress/grep/src/plugin')(config);
pluginFile(on, config);
return config;
},
},
});
packages/e2e/tsconfig.json
{
"compilerOptions": {
"jsx": "react",
"target": "ES6",
"module": "CommonJS",
"skipLibCheck": true,
"noImplicitAny": false,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strict": true,
"allowJs": true,
"removeComments": true,
"baseUrl": "./",
"types": ["cypress", "node", "cypress-real-events", "cypress-wait-until", "cypress-grep"],
"outDir": "./dist",
"lib": ["es6", "ESNext", "dom", "ES5"],
"moduleResolution": "node",
"resolveJsonModule": true,
"esModuleInterop": true
},
"include": ["./**/*.tsx", "./**/*.ts", "./**/*.d.ts"],
...
}
packages/e2e/cypress/plugins/index.ts
const registerCypressGrep = require('@cypress/grep')
registerCypressGrep();
module.exports = (on, config) => {
// we register our plugin using its register method: