---
title: "6.2.0"
url: "https://www.cypress.io/releases/6-2-0"
description: "Features: You can now listen to before:run, after:run, before:spec and after:spec events in the plugins file when setting the experimentalRunEvents…"
---

# 6.2.0

ReleasedReleased on December 20, 2020

**Features:**

-   You can now listen to `before:run`, `after:run`, `before:spec` and `after:spec` events in the plugins file when setting the [experimentalRunEvents](/app/references/experiments) configuration option to `true`. See the [`before:run`](/api/node-events/before-run-api), [`after:run`](/api/node-events/after-run-api), [`before:spec`](/api/node-events/before-spec-api) and [`after:spec`](/api/node-events/after-spec-api) docs for more information. Addressed in [#9646](https://github.com/cypress-io/cypress/pull/9646), [#14178](https://github.com/cypress-io/cypress/pull/14178) [#14238](https://github.com/cypress-io/cypress/pull/14238) and [#14263](https://github.com/cypress-io/cypress/pull/14263).
    
-   The `Timed out retrying` error message now displays the amount of time Cypress retried. Addresses [#5781](https://github.com/cypress-io/cypress/issues/5781).
    
-   The RouteMatcher argument for [cy.intercept()](/api/commands/intercept) has a new `matchUrlAgainstPath` property. When set to `true`, Cypress will match the supplied `url` against incoming `path`s. Addressed in [#14241](https://github.com/cypress-io/cypress/issues/14241).
    

**Bugfixes:**

-   Passing a URL as a string or RegExp to [cy.intercept()](/api/commands/intercept) will automatically set `matchUrlAgainstPath` to `true`. This means that the supplied string or RegExp will be matched against the **path** if matching against the **URL** fails. Fixes [#9379](https://github.com/cypress-io/cypress/issues/9379) and [#14256](https://github.com/cypress-io/cypress/issues/14256).
    
-   Getting an alias of [cy.intercept()](/api/commands/intercept) using [cy.get()](/api/commands/get) will no longer always yield `null`. Fixes [#9306](https://github.com/cypress-io/cypress/issues/9306).
    
-   [cy.intercept()](/api/commands/intercept) will now automatically responds to CORS preflight requests (HTTP `OPTIONS` requests) that match defined routes. Fixes [#9599](https://github.com/cypress-io/cypress/issues/9599).
    
-   Response errors from `forceNetworkError` can now be awaited using [cy.intercept()](/api/commands/intercept) and [cy.wait()](/api/commands/wait). Fixes [#9062](https://github.com/cypress-io/cypress/issues/9062).
    
-   Using [cy.log()](/api/commands/log) inside [.then()](/api/commands/then) no longer breaks the subject value in the command chain. Fixes [#8084](https://github.com/cypress-io/cypress/issues/8084).
    
-   Using [Cypress.Commands.overwrite](/api/cypress-api/custom-commands#Overwrite-Existing-Commands) to overwrite [.then()](/api/commands/then) now preserves the proper `this` context and sets aliases correctly. Fixes [#5101](https://github.com/cypress-io/cypress/issues/5101).
    
-   Using [Cypress.Commands.overwrite](/api/cypress-api/custom-commands#Overwrite-Existing-Commands) to overwrite `cy.route()` or [cy.intercept()](/api/commands/intercept) and wait on its alias now properly works. Fixes [#3890](https://github.com/cypress-io/cypress/issues/3890) and [#9580](https://github.com/cypress-io/cypress/issues/9580).
    
-   Cypress no longer fails to find specs if you set the fixtures folder to be the same as the integration folder. Fixes [#14226](https://github.com/cypress-io/cypress/issues/14226).
    
-   Cypress no longer fails to show error code frames if the spec filename has a space in it, fixes [#7553](https://github.com/cypress-io/cypress/issues/7553).
    

**Misc:**

-   `scrollBehavior` is now an allowed type when passed as test configuration. Addresses [#9643](https://github.com/cypress-io/cypress/issues/9643).
    
-   The `FileObject` type for the file argument of the `file:preprocessor` event now includes the `EventEmitter` type. Addresses [#9276](https://github.com/cypress-io/cypress/issues/9276).
    

**Dependency Updates:**

-   Upgraded `electron` from `11.0.2` to `11.0.3`. Addressed in [#9409](https://github.com/cypress-io/cypress/issues/9409).