Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
ronag and BridgeAR authored May 3, 2020
commit f7927246f71ae88879e462756ec0e2d606bb7a03
4 changes: 2 additions & 2 deletions test/parallel/test-http-abort-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ server.listen(0, common.mustCall(() => {
res.resume();
res.on('end', common.mustNotCall());
res.on('aborted', common.mustCall());
res.on('error', common.mustCall((err) => {
assert.strictEqual(err.code, 'ECONNRESET');
res.on('error', common.expectsError({
code: 'ECONNRESET'
}));
res.on('close', common.mustCall());
res.socket.on('close', common.mustCall());
Expand Down
6 changes: 3 additions & 3 deletions test/parallel/test-http-aborted.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ const assert = require('assert');
res.on('aborted', common.mustCall(() => {
assert.strictEqual(res.aborted, true);
}));
res.on('error', common.mustCall((err) => {
assert.strictEqual(err.code, 'ECONNRESET');
assert.strictEqual(err.message, 'aborted');
res.on('error', common.expectsError({
code: 'ECONNRESET',
message: 'aborted'
}));
req.abort();
}));
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-http-client-aborted-event.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const assert = require('assert');
server.close();
serverRes.destroy();
res.on('aborted', common.mustCall());
res.on('error', common.mustCall((err) => {
assert.strictEqual(err.code, 'ECONNRESET');
res.on('error', common.expectsError({
code: 'ECONNRESET'
}));
}));
}));
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-http-client-spurious-aborted.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ function download() {
reqCountdown.dec();
writable.end();
}));
res.on('error', common.mustCall((err) => {
assert.strictEqual(err.code, 'ECONNRESET');
res.on('error', common.expectsError({
code: 'ECONNRESET'
}));
}

Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-http-outgoing-message-capture-rejection.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ events.captureRejections = true;

req.on('response', common.mustCall((res) => {
res.on('aborted', common.mustCall());
res.on('error', common.mustCall((err) => {
assert.strictEqual(err.code, 'ECONNRESET');
res.on('error', common.expectsError({
code: 'ECONNRESET'
}));
res.resume();
server.close();
Expand Down