Releases: nock/nock
v13.0.7
v13.0.6
v13.0.5
13.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
v13.0.4
v13.0.3
v13.0.2
v13.0.1
v13.0.0
See 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
v13.0.0-beta.4
13.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.