mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-19 14:49:43 -05:00
30cbd1bc0e
* chore(deps): Update @cypress/sinon-chai to 2.9.0 🌟 * Do not pin node engine. Co-authored-by: Renovate Bot <renovatebot@gmail.com> Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
proxy
This package contains the code for Cypress's HTTP interception proxy.
HTTP interception
./lib/http contains the code that intercepts HTTP requests. The bulk of the proxy's behavior is in three files:
request-middleware.tscontains code that manipulates HTTP requests from the browserresponse-middleware.tscontains code that manipulates HTTP responses to the browsererror-middleware.tshandles errors that occur in the request/response cycle
Installing Dependencies
npm i
Building
Note: you should not ever need to build the .js files manually. @packages/ts provides require-time transpilation when in development.
npm run build-js
Testing
Tests are located in ./test
To run tests:
npm run test
Additionally, the server package contains tests that use the proxy.