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 3.1.2 to 3.1.3

2

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

@@ -5,0 +5,0 @@ "main": "src/server.js",

@@ -77,11 +77,11 @@ # fetch-mock [![Build Status](https://travis-ci.org/wheresrhys/fetch-mock.svg?branch=master)](https://travis-ci.org/wheresrhys/fetch-mock)

```
responses: {
session: function (url, opts) {
if (opts.headers.authorized) {
return {user: 'dummy-authorized-user'};
} else {
return {user: 'dummy-unauthorized-user'};
responses: {
session: function (url, opts) {
if (opts.headers.Authorization) {
return {user: 'dummy-authorized-user'};
} else {
return {user: 'dummy-unauthorized-user'};
}
}
}
}
}
```

@@ -88,0 +88,0 @@ * `greed`: Determines how the mock handles unmatched requests

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