mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
ff6535a433
This commit updates IncomingMessage#destroy() to return `this` for consistency with other readable streams. PR-URL: https://github.com/nodejs/node/pull/32789 Fixes: https://github.com/nodejs/node/issues/32772 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
11 lines
289 B
JavaScript
11 lines
289 B
JavaScript
'use strict';
|
|
|
|
// Test that http.IncomingMessage,prototype.destroy() returns `this`.
|
|
require('../common');
|
|
|
|
const assert = require('assert');
|
|
const http = require('http');
|
|
const incomingMessage = new http.IncomingMessage();
|
|
|
|
assert.strictEqual(incomingMessage.destroy(), incomingMessage);
|