fetch-mock
Advanced tools
Comparing version 4.5.2 to 4.5.3
{ | ||
"name": "fetch-mock", | ||
"version": "4.5.2", | ||
"version": "4.5.3", | ||
"description": "Mock http requests made using fetch (or isomorphic-fetch)", | ||
@@ -5,0 +5,0 @@ "main": "src/server.js", |
@@ -44,17 +44,17 @@ # fetch-mock [![Build Status](https://travis-ci.org/wheresrhys/fetch-mock.svg?branch=master)](https://travis-ci.org/wheresrhys/fetch-mock) | ||
**For the methods below `matcher`, if given, should be either the name of a route (see advanced usage below) or equal to `matcher.toString()` for any unnamed route** | ||
**For the methods below `matcherName`, if given, should be either the name of a route (see advanced usage below) or equal to `matcher.toString()` for any unnamed route** | ||
#### `calls(matcher)` | ||
Returns an object `{matched: [], unmatched: []}` containing arrays of all calls to fetch, grouped by whether fetch-mock matched them or not. If `matcher` is specified then only calls to fetch matching that route are returned. | ||
#### `calls(matcherName)` | ||
Returns an object `{matched: [], unmatched: []}` containing arrays of all calls to fetch, grouped by whether fetch-mock matched them or not. If `matcherName` is specified then only calls to fetch matching that route are returned. | ||
#### `called(matcher)` | ||
Returns a Boolean indicating whether fetch was called and a route was matched. If `matcher` is specified it only returns `true` if that particular route was matched. | ||
#### `called(matcherName)` | ||
Returns a Boolean indicating whether fetch was called and a route was matched. If `matcherName` is specified it only returns `true` if that particular route was matched. | ||
#### `lastCall(matcher)` | ||
#### `lastCall(matcherName)` | ||
Returns the arguments for the last matched call to fetch | ||
#### `lastUrl(matcher)` | ||
#### `lastUrl(matcherName)` | ||
Returns the url for the last matched call to fetch | ||
#### `lastOptions(matcher)` | ||
#### `lastOptions(matcherName)` | ||
Returns the options for the last matched call to fetch | ||
@@ -61,0 +61,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
85489