Skip to content

Commit

Permalink
Update description on 'on' fail to explicitly call out that subsequen…
Browse files Browse the repository at this point in the history
…t commands do not run when this is hit (#5554)
  • Loading branch information
jennifer-shehane authored Nov 2, 2023
1 parent 43f4fc3 commit 1773fd4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/api/cypress-api/catalog-of-events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ These are the most useful events for you to listen to.
These events come from Cypress as it issues commands and reacts to their state.
These are all useful to listen to for debugging purposes.

| Event | Details |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Name:** | `fail` |
| **Yields:** | the error **(Object)**, Mocha runnable **(Object)** |
| **Description:** | Fires when the test has failed. Binding to this event without rethrowing the error will prevent the test from failing. However this is **strongly discouraged**. Tests should never legitimately fail. This event exists because it's extremely useful for debugging purposes. See our recipe [Handling errors](/examples/recipes#Fundamentals). |
| Event | Details |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Name:** | `fail` |
| **Yields:** | the error **(Object)**, Mocha runnable **(Object)** |
| **Description:** | Fires when the test has failed. Binding to this event without rethrowing the error will prevent the test from having a 'failed' state. Subsequent commands will not be executed. However this is **strongly discouraged**. Tests should never legitimately fail. This event exists because it's extremely useful for debugging purposes. See our recipe [Handling errors](/examples/recipes#Fundamentals). |

| Event | Details |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Expand Down

0 comments on commit 1773fd4

Please sign in to comment.