forked from FarmData2/FarmData2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cypress.comp.config.js
39 lines (38 loc) · 1022 Bytes
/
.cypress.comp.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
34
35
36
37
38
39
import { defineConfig } from 'cypress';
import { execSync } from 'child_process';
export default defineConfig({
screenshotOnRunFailure: false,
video: false,
trashAssetsBeforeRuns: true,
chromeWebSecurity: false,
defaultCommandTimeout: 10000,
component: {
supportFile: '../cypress/support/component.js',
indexHtmlFile: '../cypress/support/component-index.html',
specPattern: '**/*.comp.cy.js',
devServer: {
framework: 'vue',
bundler: 'vite',
},
setupNodeEvents(on) {
on('task', {
log(message) {
console.log(message);
return null;
},
logObject(obj) {
console.log(JSON.stringify(obj, null, 2));
return null;
},
initDB() {
execSync('installDB.bash --current', { stdio: 'inherit' });
return null;
},
}),
on('before:run', () => {
execSync('installDB.bash --current', { stdio: 'inherit' });
return null;
});
},
},
});