Closed Mrblackey closed 2 months ago
The nxE2EPreset has it's own setupNodeEvents that we use to launch your server to hit during E2E tests. If you need to customize it, you could call it inside your custom setup node events... e.g.
const nxPreset = nxE2EPreset(__filename, {/*....*/})
export default defineConfig({
e2e: {
...nxPreset,
setupNodeEvents(on, config) {
config = nxPreset.setupNodeEvents(on, config);
return config;
},
}
});
The nxE2EPreset has it's own setupNodeEvents that we use to launch your server to hit during E2E tests. If you need to customize it, you could call it inside your custom setup node events... e.g.
const nxPreset = nxE2EPreset(__filename, {/*....*/}) export default defineConfig({ e2e: { ...nxPreset, setupNodeEvents(on, config) { config = nxPreset.setupNodeEvents(on, config); return config; }, } });
Thanks.
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Current Behavior
e2e
command is failing to run after addingsetupNodeEvents
tocypress.config.ts
fileExpected Behavior
e2e
execution should work the same as before addingsetupNodeEvents
tocypress.config.ts
file.GitHub Repo
https://github.com/nrwl/nx-examples
Steps to Reproduce
1.
nx run cart-e2e:e2e
Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
Workaround:
Place the
setupNodeEvents
property first:Edit:
Seems like the workaround helps with running Cypress, but the tests are failing because of