-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathcypress.config.js
33 lines (30 loc) · 920 Bytes
/
cypress.config.js
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
const { defineConfig } = require('cypress');
const fs = require('fs-extra');
module.exports = defineConfig({
e2e: {
baseUrl: 'http://localhost:1337',
specPattern: '**/*.cy.{js,ts,jsx,tsx}',
video: true,
defaultCommandTimeout: 30000,
requestTimeout: 30000,
setupNodeEvents(on, config) {
// implement node event listeners here.
// eslint-disable-next-line global-require
require('cypress-terminal-report/src/installLogsPrinter')(on);
on('task', {
deleteFolder(folderName) {
console.log(`deleting folder ${folderName}`);
return fs.remove(folderName)
.then(() => {
console.log(`folder ${folderName} deleted`);
return null;
})
.catch((err) => {
console.error(`error deleting folder ${folderName}`, err);
throw err;
});
},
});
},
},
});