nock 13.5.1 → 13.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/lib/intercept.js +2 -1
- package/lib/interceptor.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,8 +9,13 @@
|
|
|
9
9
|
[npmjs]: https://www.npmjs.com/package/nock
|
|
10
10
|
[build]: https://travis-ci.org/nock/nock
|
|
11
11
|
|
|
12
|
-
> **
|
|
13
|
-
>
|
|
12
|
+
> **Notice**
|
|
13
|
+
>
|
|
14
|
+
> We have introduced experimental support for fetch. Please share your feedback with us. You can install it by:
|
|
15
|
+
>
|
|
16
|
+
> ```
|
|
17
|
+
> npm install --save-dev nock@beta
|
|
18
|
+
> ```
|
|
14
19
|
|
|
15
20
|
HTTP server mocking and expectations library for Node.js
|
|
16
21
|
|
|
@@ -1698,6 +1703,7 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/all-contri
|
|
|
1698
1703
|
</tr>
|
|
1699
1704
|
<tr>
|
|
1700
1705
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/rsaryev"><img src="https://avatars.githubusercontent.com/u/70219513?v=4?s=100" width="100px;" alt="Saryev Rustam"/><br /><sub><b>Saryev Rustam</b></sub></a><br /><a href="https://github.com/nock/nock/commits?author=rsaryev" title="Code">💻</a> <a href="https://github.com/nock/nock/commits?author=rsaryev" title="Tests">⚠️</a></td>
|
|
1706
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mikicho"><img src="https://avatars.githubusercontent.com/u/11459632?v=4?s=100" width="100px;" alt="Michael Solomon"/><br /><sub><b>Michael Solomon</b></sub></a><br /><a href="#maintenance-mikicho" title="Maintenance">🚧</a> <a href="https://github.com/nock/nock/commits?author=mikicho" title="Code">💻</a> <a href="https://github.com/nock/nock/commits?author=mikicho" title="Documentation">📖</a></td>
|
|
1701
1707
|
</tr>
|
|
1702
1708
|
</tbody>
|
|
1703
1709
|
</table>
|
package/lib/intercept.js
CHANGED
|
@@ -350,7 +350,8 @@ function interceptorScopes() {
|
|
|
350
350
|
const nestedInterceptors = Object.values(allInterceptors).map(
|
|
351
351
|
i => i.interceptors,
|
|
352
352
|
)
|
|
353
|
-
|
|
353
|
+
const scopes = new Set([].concat(...nestedInterceptors).map(i => i.scope))
|
|
354
|
+
return [...scopes]
|
|
354
355
|
}
|
|
355
356
|
|
|
356
357
|
function isDone() {
|
package/lib/interceptor.js
CHANGED
|
@@ -510,7 +510,7 @@ module.exports = class Interceptor {
|
|
|
510
510
|
strFormattingFn = common.percentDecode
|
|
511
511
|
}
|
|
512
512
|
|
|
513
|
-
if (queries instanceof URLSearchParams) {
|
|
513
|
+
if (queries instanceof URLSearchParams || typeof queries === 'string') {
|
|
514
514
|
// Normalize the data into the shape that is matched against.
|
|
515
515
|
// Duplicate keys are handled by combining the values into an array.
|
|
516
516
|
queries = querystring.parse(queries.toString())
|