fix: update setupNodeEvents to use async/await for plugin import
This commit is contained in:
parent
ff813dc97a
commit
63fc09ad1c
|
@ -30,9 +30,11 @@ export default defineConfig({
|
||||||
testFiles: '**/*.spec.js',
|
testFiles: '**/*.spec.js',
|
||||||
supportFile: 'test/cypress/support/unit.js',
|
supportFile: 'test/cypress/support/unit.js',
|
||||||
},
|
},
|
||||||
setupNodeEvents(on, config) {
|
setupNodeEvents: async (on, config) => {
|
||||||
import('cypress-mochawesome-reporter/plugin').then((plugin) => plugin.default(on));
|
const plugin = await import('cypress-mochawesome-reporter/plugin');
|
||||||
// implement node event listeners here
|
plugin.default(on);
|
||||||
|
|
||||||
|
return config;
|
||||||
},
|
},
|
||||||
viewportWidth: 1280,
|
viewportWidth: 1280,
|
||||||
viewportHeight: 720,
|
viewportHeight: 720,
|
||||||
|
|
Loading…
Reference in New Issue