mirror of
https://github.com/cypress-io/cypress.git
synced 2026-04-20 22:19:46 -05:00
Add missing Date to cy.clock typescript def (#4106)
* add missing option from clock tsdef * add type test for cy.clock with Date
This commit is contained in:
committed by
Jennifer Shehane
parent
3394ea990a
commit
146d4cd5cf
Vendored
+1
-1
@@ -510,7 +510,7 @@ declare namespace Cypress {
|
||||
* // keep current date but override "setTimeout" and "clearTimeout"
|
||||
* cy.clock(null, ['setTimeout', 'clearTimeout'])
|
||||
*/
|
||||
clock(now: number, functions?: Array<'setTimeout' | 'clearTimeout' | 'setInterval' | 'clearInterval'>, options?: Loggable): Chainable<Clock>
|
||||
clock(now: number, functions?: Array<'setTimeout' | 'clearTimeout' | 'setInterval' | 'clearInterval' | 'Date'>, options?: Loggable): Chainable<Clock>
|
||||
/**
|
||||
* Mocks global clock and all functions.
|
||||
*
|
||||
|
||||
@@ -271,3 +271,6 @@ namespace CypressTriggerTests {
|
||||
arbitraryProperty: 0
|
||||
})
|
||||
}
|
||||
|
||||
const now = new Date(2019, 3, 2).getTime()
|
||||
cy.clock(now, ['Date'])
|
||||
|
||||
Reference in New Issue
Block a user