Skip to content

Commit

Permalink
docs(cypress): fix code snippet in cypress-setup-node-events.md (#22977)
Browse files Browse the repository at this point in the history
  • Loading branch information
chabb committed Apr 25, 2024
1 parent 5f4dc88 commit aa1be0f
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit aa1be0f

Please sign in to comment.