mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-14 19:20:42 -06:00
fix(types): use SinonStatic for Cypress.sinon type (#7398)
This commit is contained in:
2
cli/types/index.d.ts
vendored
2
cli/types/index.d.ts
vendored
@@ -222,7 +222,7 @@ declare namespace Cypress {
|
||||
* @see https://on.cypress.io/stubs-spies-and-clocks
|
||||
* @see https://example.cypress.io/commands/spies-stubs-clocks
|
||||
*/
|
||||
sinon: sinon.SinonApi
|
||||
sinon: sinon.SinonStatic
|
||||
|
||||
/**
|
||||
* Cypress version string. i.e. "1.1.2"
|
||||
|
||||
@@ -14,10 +14,15 @@ namespace CypressMomentTests {
|
||||
}
|
||||
|
||||
namespace CypressSinonTests {
|
||||
Cypress.sinon // $ExpectType SinonApi
|
||||
Cypress.sinon // $ExpectType SinonStatic
|
||||
|
||||
const stub = cy.stub()
|
||||
stub(2, 'foo')
|
||||
expect(stub).to.have.been.calledWith(Cypress.sinon.match.number, Cypress.sinon.match('foo'))
|
||||
|
||||
const stub2 = Cypress.sinon.stub()
|
||||
stub2(2, 'foo')
|
||||
expect(stub2).to.have.been.calledWith(Cypress.sinon.match.number, Cypress.sinon.match('foo'))
|
||||
}
|
||||
|
||||
namespace CypressJqueryTests {
|
||||
|
||||
Reference in New Issue
Block a user