fix: update setupNodeEvents to use async/await for plugin import

This commit is contained in:
Javi Gallego 2025-01-29 07:35:04 +01:00
parent ff813dc97a
commit 63fc09ad1c
1 changed files with 5 additions and 3 deletions

View File

@ -30,9 +30,11 @@ export default defineConfig({
testFiles: '**/*.spec.js',
supportFile: 'test/cypress/support/unit.js',
},
setupNodeEvents(on, config) {
import('cypress-mochawesome-reporter/plugin').then((plugin) => plugin.default(on));
// implement node event listeners here
setupNodeEvents: async (on, config) => {
const plugin = await import('cypress-mochawesome-reporter/plugin');
plugin.default(on);
return config;
},
viewportWidth: 1280,
viewportHeight: 720,