Socket
Socket
Sign inDemoInstall

fetch-mock

Package Overview
Dependencies
9
Maintainers
3
Versions
213
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 9.2.0 to 9.2.1

2

package.json
{
"name": "fetch-mock",
"type": "module",
"version": "9.2.0",
"version": "9.2.1",
"description": "Mock http requests made using fetch (or isomorphic-fetch)",

@@ -6,0 +6,0 @@ "main": "./cjs/server.js",

@@ -7,7 +7,8 @@ # fetch-mock

- helpers for all common http methods and for responding a limited number of times
- declarative matching for most aspects of a http request
- delayed responses
- spying on real network requests
- support for advanced fetch behaviours, such as streaming responses and aborting
- mocks most of the fetch API spec, even advanced behaviours such as streaming and aborting
- declarative matching for most aspects of a http request, including url, headers, body and query parameters
- shorthands for the most commonly used features, such as matching a http method or matching one fetch only
- support for delaying responses, or using your own async functions to define custom race conditions
- can be used as a spy to observe real network requests
- isomorphic, and supports either a global fetch instance or a locally required instance

@@ -14,0 +15,0 @@ _New_ If using jest, try the new [fetch-mock-jest](https://www.npmjs.com/package/fetch-mock-jest) wrapper.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc