Releases: nock/nock
Releases · nock/nock
v13.0.0-beta.3
13.0.0-beta.3 (2020-04-05)
feature
BREAKING CHANGES
Scope.log
has been removed. Use thedebug
library when debugging failed matches.
v13.0.0-beta.2
13.0.0-beta.2 (2020-04-04)
Bug Fixes
BREAKING CHANGES
-
Calling
request.abort()
:- Use to always emit a 'socket hang up' error. Now only emits the error if
abort
is called between the 'socket' and 'response' events. - The emitted 'abort' event now happens on
nextTick
. - The socket is now only destroyed if the 'socket' event has fired, and now emits a 'close' event on
nextTick
that propagates though the request object. request.aborted
attribute is set totrue
instead of a timestamp. Changed in Node v11.0 nodejs/node#20230- Calling
write
,end
, orflushHeaders
on an aborted request no longer emits an error.
However, writing to a request that is already finished (ended) will emit a 'write after end' error.
- Use to always emit a 'socket hang up' error. Now only emits the error if
-
Playback of a mocked responses will now never happen until the 'socket' event is emitted.
The 'socket' event is still artificially set to emit onnextTick
when a ClientRequest is created.
This means in the following code the Scope will never be done because at least one tick needs
to happen before any matched Interceptor is considered consumed.
const scope = nock(...).get('/').reply()
const req = http.get(...)
scope.done()
v13.0.0-beta.1
13.0.0-beta.1 (2020-03-31)
chore
BREAKING CHANGES
- Skipping body matching using "*" is no longer supported.
Set the definitionbody
toundefined
instead.
This was deprecated in v11.
v12.0.3
v12.0.2
v12.0.1
v12.0.0
12.0.0 (2020-02-16)
BREAKING CHANGES
- Require Node 10+ (#1895) (123832e), closes #1895
- Do not return the
nock
global fromcleanAll()
(#1872) (0a4a944), closes #1872 - Drop support for String constructor (#1873) (e33b3e8), closes #1873
When checking types of strings, Nock will no longer recognize the String constructor, only string primitives.