Socket
Socket
Sign inDemoInstall

fetch-mock

Package Overview
Dependencies
Maintainers
1
Versions
226
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetch-mock - npm Package Compare versions

Comparing version 2.2.15 to 2.3.0

2

package.json
{
"name": "fetch-mock",
"version": "2.2.15",
"version": "2.3.0",
"description": "Mock http requests made using fetch (or isomorphic-fetch)",

@@ -5,0 +5,0 @@ "main": "es5/client.js",

@@ -57,4 +57,8 @@ # fetch-mock [![Build Status](https://travis-ci.org/wheresrhys/fetch-mock.svg?branch=master)](https://travis-ci.org/wheresrhys/fetch-mock) [![Coverage Status](https://coveralls.io/repos/wheresrhys/fetch-mock/badge.svg)](https://coveralls.io/r/wheresrhys/fetch-mock)

* `response` [required]: as specified above
* `mock(routes)` - array of route configuration objects
* `mock(config)` - object containing more complex config for fine grained control over every aspect of mocking behaviour. May have the following properties
#### `mock(routes)`
Pass in an array of route configuration objects
#### `mock(config)`
Pas in an object containing more complex config for fine grained control over every aspect of mocking behaviour. May have the following properties
- `routes`: Either a single route config object or an array of them (see above)

@@ -61,0 +65,0 @@ - `responses`: When `registerRoute()` (see below) has already been used to register some routes then `responses` can be used to override the default response. Its value should be an object mapping route names to responses, which should be similar to those provided in the `response` property of stanadard route configurations e.g.

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc