Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc: Add generic types to net-stubbing for use in intercept and wait #29508

4 changes: 4 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ _Released 5/21/2024_
- Fixed an issue setting the `x-cypress-file-path` header when there are invalid header characters in the file path. Fixes [#25839](https://github.com/cypress-io/cypress/issues/25839).
- Fixed the display of some command assertions. Fixed in [#29517](https://github.com/cypress-io/cypress/pull/29517).

**Misc:**

- Enhanced the type definitions available to `cy.intercept` and `cy.wait`. The `body` property of both the request and response in an interception can optionally be specified with user-defined types. Addresses [#29507](https://github.com/cypress-io/cypress/issues/29507).

**Dependency Updates:**

- Updated js-cookie from `2.2.1` to `3.0.5`. Addressed in [#29497](https://github.com/cypress-io/cypress/pull/29497).
Expand Down
2 changes: 1 addition & 1 deletion cli/types/tests/cypress-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ describe('then', () => {

cy.wait(['@foo', '@bar'])
.then(([first, second]) => {
first // $ExpectType Interception
first // $ExpectType Interception<any, any>
})

cy.wait(1234) // $ExpectType Chainable<undefined>
Expand Down
Loading
Loading