Skip to content
masterclass Buddy

Cypress · Function

defineConfig

defineConfig wraps a Cypress configuration object and enables editor completion. Cypress configuration files can use JavaScript or TypeScript, with ESM and CommonJS forms supported.

Last updated

Syntax

defineConfig(config)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • baseUrl
  • e2e
  • component
  • defaultBrowser
  • viewportWidth
  • viewportHeight
  • --config
  • --config-file

Source: Configuration in Cypress | Cypress Documentation. Checked 2026-11-03.