Changelog History
Page 1
-
v13.0.5 Changes
November 11, 202013.0.5 (2020-11-11)
๐ Bug Fixes
- overrider: allow calling empty
req.end
multiple times (20e9f8a), closes /github.com/nodejs/node/blob/39a7f7663e8f70fc774105d8fa41b8e4cc69149f/lib/_http_outgoing.js#L816
- overrider: allow calling empty
-
v13.0.4 Changes
August 11, 2020 -
v13.0.3 Changes
July 27, 2020 -
v13.0.2 Changes
July 01, 2020 -
v13.0.1 Changes
July 01, 2020 -
v13.0.0 Changes
June 15, 2020See the Migration Guide
๐ฅ Breaking changes
๐
Scope.log
has been removed. Use thedebug
library when debugging failed matches.๐
socketDelay
has been removed. UsedelayConnection
instead.delay
,delayConnection
, anddelayBody
are now setters instead of additive.๐ When recording, skipping body matching using
*
is no longer supported bynock.define
.
Set the definition body toundefined
instead.โก๏ธ
ClientRequest.abort()
has been updated to align with Node's native behavior.
This could be considered a feature, however, it created some subtle differences that are not backwards compatible. Refer to the migration guide for details.๐คก Playback of a mocked responses will now never happen until the 'socket' event is emitted.
-
v13.0.0-beta.5 Changes
May 14, 202013.0.0-beta.5 (2020-05-14)
๐ Bug Fixes
-
v13.0.0-beta.4 Changes
May 02, 202013.0.0-beta.4 (2020-05-02)
๐ Features
๐ฅ BREAKING CHANGES
- ๐
socketDelay
has been removed. UsedelayConnection
instead. delay
,delayConnection
, anddelayBody
are now setters instead of additive.
example:nock('http://example.com').get('/').delay(1).delay({ head: 2, body: 3 }).delayConnection(4).delayBody(5).delayBody(6).reply()
Previously, the connection would have been delayed by 7 and the body delayed by 14.
Now, the connection will be delayed by 4 and the body delayed by 6. - ๐
-
v13.0.0-beta.3 Changes
April 05, 202013.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 Changes
April 04, 202013.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.
๐คก 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()
- Use to always emit a 'socket hang up' error. Now only emits the error if