mirror of
https://github.com/cypress-io/cypress.git
synced 2026-04-22 15:12:27 -05:00
Fix the cy.once typings (#4788)
* Fix the cy.once typings * C -> c Co-authored-by: Zach Bloomquist <github@chary.us>
This commit is contained in:
committed by
Brian Mann
parent
ffe75caa80
commit
abc996ec70
Vendored
+12
@@ -327,6 +327,12 @@ declare namespace Cypress {
|
||||
*/
|
||||
on: Actions
|
||||
|
||||
/**
|
||||
* These events come from Cypress as it issues commands and reacts to their state. These are all useful to listen to for debugging purposes.
|
||||
* @see https://on.cypress.io/catalog-of-events#App-Events
|
||||
*/
|
||||
once: Actions
|
||||
|
||||
/**
|
||||
* These events come from Cypress as it issues commands and reacts to their state. These are all useful to listen to for debugging purposes.
|
||||
* @see https://on.cypress.io/catalog-of-events#App-Events
|
||||
@@ -934,6 +940,12 @@ declare namespace Cypress {
|
||||
*/
|
||||
on: Actions
|
||||
|
||||
/**
|
||||
* These events come from Cypress as it issues commands and reacts to their state. These are all useful to listen to for debugging purposes.
|
||||
* @see https://on.cypress.io/catalog-of-events#App-Events
|
||||
*/
|
||||
once: Actions
|
||||
|
||||
/**
|
||||
* These events come from Cypress as it issues commands and reacts to their state. These are all useful to listen to for debugging purposes.
|
||||
* @see https://on.cypress.io/catalog-of-events#App-Events
|
||||
|
||||
@@ -246,6 +246,18 @@ namespace CypressOnTests {
|
||||
})
|
||||
}
|
||||
|
||||
namespace CypressOnceTests {
|
||||
Cypress.once('uncaught:exception', (error, runnable) => {
|
||||
error // $ExpectType Error
|
||||
runnable // $ExpectType IRunnable
|
||||
})
|
||||
|
||||
cy.once('uncaught:exception', (error, runnable) => {
|
||||
error // $ExpectType Error
|
||||
runnable // $ExpectType IRunnable
|
||||
})
|
||||
}
|
||||
|
||||
namespace CypressOffTests {
|
||||
Cypress.off('uncaught:exception', (error, runnable) => {
|
||||
error // $ExpectType Error
|
||||
|
||||
Reference in New Issue
Block a user