Philipp Schrader | 175a93c | 2023-02-19 13:13:40 -0800 | [diff] [blame] | 1 | const {defineConfig} = require('cypress'); |
| 2 | |
| 3 | module.exports = defineConfig({ |
| 4 | e2e: { |
| 5 | specPattern: ['*.cy.js'], |
| 6 | supportFile: false, |
| 7 | setupNodeEvents(on, config) { |
| 8 | on('before:browser:launch', (browser = {}, launchOptions) => { |
| 9 | launchOptions.args.push('--disable-gpu-shader-disk-cache'); |
Philipp Schrader | 54cae03 | 2023-02-26 15:08:31 -0800 | [diff] [blame^] | 10 | launchOptions.args.push('--enable-logging'); |
| 11 | launchOptions.args.push('--v=stderr'); |
| 12 | return launchOptions; |
Philipp Schrader | 175a93c | 2023-02-19 13:13:40 -0800 | [diff] [blame] | 13 | }); |
| 14 | |
| 15 | // Lets users print to the console: |
| 16 | // cy.task('log', 'message here'); |
| 17 | on('task', { |
| 18 | log(message) { |
| 19 | console.log(message); |
| 20 | return null; |
| 21 | }, |
| 22 | }); |
| 23 | }, |
| 24 | }, |
| 25 | }); |