Skip to content

Commit

Permalink
fix: statusCode allow 999
Browse files Browse the repository at this point in the history
https://lodash.com/docs/#inRange `end` is exclusive, so it needs to be set to 1000 to allow status code 999 to be included (as per documented).
  • Loading branch information
riwu committed Sep 21, 2023
1 parent 381b505 commit ee8390d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ _Released 09/12/2023_
- Fixed an issue where `enter`, `keyup`, and `space` events were not triggering `click` events properly in some versions of Firefox. Addressed in [#27715](https://github.com/cypress-io/cypress/pull/27715).
- Fixed a regression in `13.0.0` where tests using Basic Authorization can potentially hang indefinitely on chromium browsers. Addressed in [#27781](https://github.com/cypress-io/cypress/pull/27781).
- Fixed a regression in `13.0.0` where component tests using an intercept that matches all requests can potentially hang indefinitely. Addressed in [#27788](https://github.com/cypress-io/cypress/pull/27788).
- Fixed net stubbing not permitting status code 999. Addressed in [#27853](https://github.com/cypress-io/cypress/pull/27853).

**Dependency Updates:**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function validateStaticResponse (cmd: string, staticResponse: StaticRespo

// statusCode must be a three-digit integer
// @see https://tools.ietf.org/html/rfc2616#section-6.1.1
if (statusCode && !(_.isNumber(statusCode) && _.inRange(statusCode, 100, 999))) {
if (statusCode && !(_.isNumber(statusCode) && _.inRange(statusCode, 100, 1000))) {
err('`statusCode` must be a number between 100 and 999 (inclusive).')
}

Expand Down

0 comments on commit ee8390d

Please sign in to comment.