Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(cypress): fix code snippet in cypress-setup-node-events.md #22977

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/shared/packages/cypress/cypress-setup-node-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The Cypress preset that Nx provides (`@nx/cypress/plugins/cypress-preset`) uses
import { defineConfig } from 'cypress';
import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset';

const config = nxE2EPreset(__filename, {
const preset = nxE2EPreset(__filename, {
cypressDir: 'src',
bundler: 'vite',
webServerCommands: {
Expand All @@ -32,10 +32,10 @@ const config = nxE2EPreset(__filename, {

export default defineConfig({
e2e: {
...config,
...preset,
async setupNodeEvents(on, config) {
// This line sets up the web server as provided via `webServerCommands` and `ciWebServerCommand`
await config.setupNodeEvents(on, config);
await preset.setupNodeEvents(on, config);

// Register your listeners here
},
Expand Down