I want to handle uncaught exceptions occurs while running cypress tests using cucumber.I have to apply the settings before all the feature tests in all modules. How can I handle that?
I tried using the on() function in cypress config, but it is showing me an error
async setupNodeEvents(on, config) {
await addCucumberPreprocessorPlugin(on, config);
on(
'file:preprocessor',
createBundler({
plugins: [createEsbuildPlugin(config)],
}),
);
cy.on('uncaught:exception', (err, runnable) => {
return false
})
return config;
},