mappersmith
Advanced tools
Comparing version 2.29.2 to 2.29.3
@@ -16,3 +16,3 @@ "use strict"; | ||
/* global VERSION */ | ||
var version = "2.29.2"; | ||
var version = "2.29.3"; | ||
exports.version = version; | ||
@@ -19,0 +19,0 @@ var configs = { |
{ | ||
"name": "mappersmith", | ||
"version": "2.29.2", | ||
"version": "2.29.3", | ||
"description": "It is a lightweight rest client for node.js and the browser", | ||
@@ -5,0 +5,0 @@ "author": "Tulio Ornelas <ornelas.tulio@gmail.com>", |
@@ -222,3 +222,3 @@ [![npm version](https://badge.fury.io/js/mappersmith.svg)](http://badge.fury.io/js/mappersmith) | ||
__NOTE__: It's possible to post body as JSON, check the [EncodeJsonMiddleware](#encode-json-middleware) below for more information | ||
__NOTE__: It's possible to post body as JSON, check the [EncodeJsonMiddleware](#middleware-encode-json) below for more information | ||
__NOTE__: The `bodyAttr` param can be set at manifest level. | ||
@@ -294,3 +294,3 @@ | ||
__NOTE__: A default timeout can be configured with the use of the [TimeoutMiddleware](#timeout-middleware), check the middleware section below for more information. | ||
__NOTE__: A default timeout can be configured with the use of the [TimeoutMiddleware](#middleware-timeout), check the middleware section below for more information. | ||
__NOTE__: The `timeoutAttr` param can be set at manifest level. | ||
@@ -927,3 +927,3 @@ | ||
The assert object can be used to retrieve the requests, example: | ||
The assert object can be used to retrieve the requests that went through the created mock, example: | ||
@@ -942,2 +942,11 @@ ```javascript | ||
The `mock` object is an instance of `MockAssert` and exposes three methods: | ||
- _calls()_: returns a `Request` array; | ||
- _mostRecentCall()_: returns the last Request made. Returns `null` if array is empty. | ||
- _callsCount()_: returns the number of requests that were made through the mocked client; | ||
__Note__: | ||
The assert object will also be returned in the `mockRequest` function call. | ||
If you have a middleware with an async request phase use `assertObjectAsync` to await for the middleware execution, example: | ||
@@ -1284,3 +1293,2 @@ | ||
```sh | ||
node spec/integration/server.js & | ||
yarn test | ||
@@ -1287,0 +1295,0 @@ ``` |
@@ -90,3 +90,3 @@ "use strict"; | ||
if (new RegExp(pattern).test(path)) { | ||
path = path.replace("{".concat(key, "}"), value); | ||
path = path.replace("{".concat(key, "}"), encodeURIComponent(value)); | ||
delete params[key]; | ||
@@ -93,0 +93,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
145361
1307