npm / cypress
cypress
What changed in cypress 16, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
129 breaking1 security7 deprecations12 new APIs and options8 behavior and defaults1 tooling
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initcypress 16158 changes
Breaking changes 129
The result arguments supplied to after:run handlers have a changed shape; update property access in handlers.
The result arguments supplied to after:spec handlers have a changed shape; update property access in handlers.
Aliases are always re-queried, which can change test outcomes when the DOM changes; use a static alias when the value should not be re-queried.
The configuration option was removed; Cypress warns if it remains, and there is no behavior change.
The migration-gate configuration option was removed in Cypress 16.0 and is no longer valid.
The minimum supported Angular version for component testing is now 21.
The minimum required Angular version is now 21.0.0; Angular 18, 19, and 20 are no longer supported.
Angular 17 is no longer supported for component testing; the minimum required Angular version is 18.0.0.
Component testing requires Angular 17.2.0 or later.
The event's second argument is now a launchOptions object rather than an array of browser arguments; use launchOptions.args to access arguments.
Starting in Cypress 14, official support covers the latest three major versions of Chrome, Firefox, and Edge.
CoffeeScript support was removed, affecting .coffee specs, support files, and fixtures.
Built-in CoffeeScript support was removed: the default preprocessor no longer bundles coffee-loader or coffeescript, and .coffee is no longer resolved for specs, support files, or fixtures.
For Create React App component testing, change the framework option from create-react-app to react after selecting a bundler.
For Vue CLI component testing, change the framework option from vue-cli to vue after selecting a bundler.
This option is no longer supported; use
specPatterninside thecomponentconfiguration object.Configuration files are required, so configFile false is no longer valid in the module API; JSON config files are also unsupported.
Cookie commands use hostname rather than superdomain by default; pass an explicit domain option when cookies should be shared across subdomains.
Component tests now need a bundler; CRA users must eject to webpack or use vite, and change the framework configuration to react.
Removed; delete .end() calls.
cy.end() was removed; delete calls because a new cy command already terminates the previous chain.
Removed; replace calls with cy.task().
The result property
codewas renamed toexitCode; update assertions that read the old property.cy.exec() was removed. Use cy.task() for Node.js work, or spawn external commands from a task with execFileSync and an argument array.
Use this command as the replacement for the removed cy.server, cy.route, and Cypress.server.defaults APIs.
A subsequent mount call in the same test removes the previously mounted component from the DOM.
Mounting options no longer accept cssFile, cssFiles, style, styles, stylesheet, or stylesheets; use test-imported CSS or a supportFile for styles.
Angular mounting-option providers are assigned at the module level, so they can override module providers but not providers declared in Component metadata.
Tests interacting with a second origin must use
cy.origin()because Cypress no longer injectsdocument.domaininto text/html content by default.readFile is a query and re-reads the file when a later command in the chain fails, retrying until the requested property and assertions pass.
The command was removed; use cy.intercept instead.
The command was removed; use cy.intercept instead.
The deprecated three-argument signature is no longer supported; use
.callsFake(fn)on the stub instead.CYPRESS_* environment variables populate env only and do not reach Cypress.expose(); pass values with --expose or copy them into config.expose.
The harness is deprecated and is no longer shipped with the Cypress binary.
The temporary Angular 17 test harness is installed as
@cypress/angular; update mount imports fromcypress/angular.The package requires zone.js version 0.14.0 or newer for Angular component testing.
The Angular signals test harness has been merged into cypress/angular; migrate imports from cypress/angular-signals.
Cypress Cloud communication verifies certificate authorities and rejects unauthorized calls; networks using a self-signed CA can configure the listed CA environment variables.
The command no longer prints proxy or CYPRESS_* environment variables, making output safer to share in bug reports and CI logs.
To launch directly to the specs list, cypress open now requires --browser and either --e2e or --component.
This CLI command has been removed; use cypress open --component instead.
The plugins file is no longer supported or automatically loaded; its functionality is replaced by setupNodeEvents() and devServer configuration options.
The React 18 test harness has been merged into cypress/react; migrate imports from cypress/react18 to cypress/react.
The harness is deprecated and is no longer shipped with the Cypress binary.
This CLI command has been removed; use cypress run --component instead.
When recording a run to Cloud with Test Replay enabled, the Runner UI is hidden by default, affecting recorded video and runner screenshots; it can be enabled with --runner-ui.
The experimental Cypress Studio has been removed.
Vite 4 is no longer supported for component testing; the minimum supported Vite version is 5.
The package is ESM-only and can no longer be used from a CommonJS context; move the Cypress configuration to ESM or TypeScript.
The default preprocessor no longer shims all built-ins previously provided by webpack v4; configure any additional required built-ins through webpack fallback options.
Webpack 4 and Webpack Dev Server 4 are no longer supported; component testing must use supported versions or an independently installed deprecated package as a temporary workaround.
Webpack 4 is no longer supported for end-to-end preprocessing; a deprecated standalone package version is available as a temporary workaround.
The undocumented firefox:force:gc and log:memory:pressure methods have been removed with no replacement.
This API can no longer overwrite readFile; use Cypress.Commands.overwriteQuery to overwrite the query instead.
Queries such as cookie and storage reads must be overwritten with overwriteQuery() rather than Cypress.Commands.overwrite().
Setting blockHosts with Cypress.config() during test execution now throws; set it in a describe, context, or it test configuration instead.
A project cannot contain both JavaScript and TypeScript Cypress config files; Cypress reports an error when loading them together.
The API was removed; use cy.session to preserve cookies and browser storage between tests.
The API was removed; use cy.session to preserve cookies and browser storage between tests.
onElementis no longer an option todefaults; remove it from calls to the method.Removed; migrate to cy.env() or Cypress.expose().
Cypress.env() was removed. Use cy.env() for sensitive values or Cypress.expose() for non-sensitive configuration needing synchronous browser access.
Cypress.env() is no longer available in Cypress 16.0; migrate reads to cy.env() or Cypress.expose().
Support for cypress.json was removed; Cypress loads JavaScript or TypeScript configuration files instead.
The API was renamed to
Cypress.ElementSelector; migrate callers to the new name.The API was removed; use cy.intercept instead.
Configure component testing dev servers by specifying a framework and bundler in this option; dev server packages are no longer directly importable.
The env key is no longer valid in per-test or suite config overrides; use expose if necessary.
This is now a testing-type-specific option. Its defaults differ by testing type, and
**/node_modules/**is automatically added and cannot be overridden.The configuration option was removed alongside cy.exec(); setting it prints a warning and is otherwise ignored.
The experimental boolean configuration option was removed and replaced by visibilityStrategy.
This configuration option has been removed; remove it and use cy.intercept() to handle fetch requests.
The experimental configuration option is ignored and produces a warning; use manageBrowserMemory instead.
The experiment flag was removed when Session and Origin became generally available.
The option was removed because its behavior— not injecting
document.domain—is now the default.The configuration option was removed; remove it and enable removeSRIAttributes if it was used for SRI.
The configuration option was removed. If SRI attributes block rewritten resources, use removeSRIAttributes instead.
The experimental Cypress Studio option has been removed; setting it causes Cypress to error on load.
Electron no longer allows fetch or XMLHttpRequest requests from an about:blank page; use cy.request() or navigate first with cy.visit().
Cypress 15 removed Firefox CDP automation and uses WebDriver BiDi only; supported Firefox minimums are 135 for Cypress 15.0.0–15.18.1 and 140 for 15.19.0 and newer.
The
getSelectormethod has been removed from the Selector Playground API.Cypress 15 prebuilt Linux binaries no longer support distributions based on glibc below 2.31.
Cypress 14 prebuilt Linux binaries no longer support distributions based on glibc below 2.28.
invoke throws if the called function returns a promise; use then to call a method that returns a promise. Chained commands can also cause the function to be invoked multiple times.
JIT compilation is now the default behavior for component tests; set this option to false to disable it.
JIT compilation no longer applies with vite because there is no benefit to enabling it.
The default delay between keystrokes changed from 10 to 0 milliseconds to improve performance of typing-heavy test runs.
Cypress 14 requires macOS 11 (Big Sur) or newer because of its Electron upgrade.
Replaces experimentalMemoryManagement and defaults to true, enabling browser memory management by default for users running Chromium-based browsers.
The properties and values returned by the Module API changed shape, so code reading cypress.run() results may need updated property access.
The cypress/vue mount function now returns an object containing both the VueWrapper and component instance, rather than the VueWrapper itself.
mountCallback from cypress/vue has been removed; the notes recommend using mount.
mountHook from cypress/react has been removed; the notes recommend replacing it with mount and a component.
Chrome, Chromium, and Edge route test traffic through the native browser network, so applications negotiate the server-supported protocol as in production; some network behaviors differ.
The minimum supported Next.js version for component testing is now 15.0.4.
Component testing requires Next.js 15.0.4 or newer, or Next.js 16; Next.js 14 is no longer supported.
Component testing no longer supports Next.js versions 10 through 13; the minimum supported version is 15.0.4.
Cypress 16 requires Node.js 22.x, 24.x, or 26.x and above to install the binary; Node.js 20 and 25 are no longer supported.
Cypress 15 supports Node.js 20, 22, and 24+, and no longer supports Node.js 18 or 23 for installing Cypress.
Cypress 14 requires Node.js 18 or newer to install Cypress and no longer supports Node.js 16 or 21.
Node.js 14 support has been removed; Node.js 16 is deprecated and users are recommended to update to at least Node.js 18.
Installing the Cypress npm package requires Node.js 14, 16, or 18 and later; Node.js 12, 15, and 17 are no longer supported.
The deprecated configuration option has been removed; Cypress uses the Node.js version it was launched with to execute setupNodeEvents.
Nuxt 2 apps can no longer be component tested out of the box because Cypress no longer ships the Vue 2 harness.
Component testing no longer supports React versions below 18.0.0; the minimum required version is 18.0.0.
The Run all specs functionality has been removed.
The Run filtered specs functionality has been removed.
Generated screenshot paths now strip common ancestor paths shared by discovered spec files or specs selected with
--specor the spec module API.A should callback throws if it invokes Cypress commands; use then to execute commands on the yielded value.
This option must be defined inside
componentore2e. Defaults no longer match CoffeeScript or CJSX; component tests matching the E2E pattern are excluded.This option is now testing-type-specific and invalid at the top level; multiple matching support files for one testing type cause a load error.
Cypress no longer ships the Svelte 3 and 4 component testing harness; the legacy harness can be installed independently via @cypress/svelte.
When enabled, Cypress resets the browser context before each test, clearing the page, cookies, localStorage, and sessionStorage across domains.
This option is no longer used; use
specPatterninside thecomponentore2econfiguration object.The minimum supported TypeScript version is 4.x.
unmount from cypress/react has been removed; the notes recommend using React's unmountComponentAtNode API.
Unsupported browser versions can no longer be run with cypress run or cypress open; Cypress displays an error instead.
Video recording is disabled by default; set video to true to continue recording.
Video compression is disabled by default, reducing run time while producing larger, higher-quality video files; enable it to reduce file size.
Generated video paths now strip common ancestor paths shared by discovered spec files or specs selected with
--specor the spec module API.This configuration option has been removed; delete passing-test videos if you want to prevent their upload to Cloud.
Replaces experimentalFastVisibility with a configuration option accepting 'legacy' or 'modern'; 'modern' is now the default, and the option is deprecated as a temporary migration aid.
The minimum supported Vite version for component testing is now 8.
An inline viteConfig in cypress.config no longer automatically merges with vite.config.js; explicitly import and merge the configuration if needed.
Cypress no longer ships the Vue 2 component testing harness with the Cypress binary; it can be installed independently as @cypress/vue2.
Component tests using Vue CLI now need a bundler; migrate to webpack or vite.
@cypress/webpack-dev-server no longer supports webpack-dev-server version 3 and ships with version 5 by default; webpack 4 users should install version 4.
within throws when given multiple elements as its subject; reduce the subject to one element or use aliases or each for collections.
Security 1
Use cy.env() to read sensitive values asynchronously; it is read-only and requests only the keys you need.
Deprecations 7
Launching directly into component testing with this command is deprecated; use
cypress open --componentinstead.Electron is deprecated as a test browser; plan to switch to an installed browser.
The bundled Electron browser is deprecated as a test browser and will be removed in a future major version; configure another browser if runs rely on Electron as the implicit default.
The bundled Electron browser is deprecated as a test browser in Cypress 16.0 and will be removed in a future major version.
Electron targeting emits a deprecation warning and will fail after removal; use an installed browser instead.
Setting
injectDocumentDomainto true avoids somecy.origin()calls for matching superdomains but emits a deprecation warning and will be removed in a future version.The resourceType option on cy.intercept is deprecated and its types may change or it may be removed in the future.
New APIs and options 12
Pass a timeout to cy.env() for slow secret lookups; its 4000ms default does not follow defaultCommandTimeout.
The React mount library is included in the main
cypresspackage and can be imported from this path.The Vue mount library is included in the main
cypresspackage and can be imported from this path.Cypress automatically loads a project-root cypress.config.js file when present.
Cypress automatically loads a project-root cypress.config.ts file when present.
The Selector Playground API was renamed to
Cypress.ElementSelectorto reflect use beyond the Selector Playground.Use Cypress.expose() for public, non-sensitive configuration that needs synchronous access and can be available in the browser.
Set
defaultBrowserto an installed browser to prevent Cypress from falling back to Electron when no browser is specified.Set this option to true to use external dependencies in cy.origin callbacks.
Configure public, non-sensitive values under expose instead of env when they should be available through Cypress.expose().
Pass public configuration values with --expose when running Cypress; -x is also available.
Pass this option to cypress run to show the Runner UI during a Cloud-recorded run.
Behavior and default changes 8
Cypress now uses @angular/platform-browser in place of @angular/platform-browser-dynamic; Angular 21 uses the replacement by default.
Now a retry-able query that re-reads localStorage across origins and retries chained assertions; it accepts a timeout option and uses defaultCommandTimeout.
Now a retry-able query that re-reads sessionStorage across origins and retries chained assertions; it accepts a timeout option and uses defaultCommandTimeout.
The command became generally available; using require and import in its callback remains disabled by default.
The command became generally available for setting up and caching browser storage between tests.
The zoneless testing harness is now the default cypress/angular test harness.
Built-in placeholder
mountandhovercommands can now be overwritten without usingCypress.Commands.overwrite().Users with this existing experimental flag can remove it from their configuration; JIT compilation is now controlled by justInTimeCompile.
Tooling 1
Use this command to launch directly into component testing from the main app.