mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 10:15:07 +08:00
Signed-off-by: Sebastian Beltran <bjohansebas@gmail.com> PR-URL: https://github.com/nodejs/node/pull/58535 Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Aviv Keller <me@aviv.sh>
16 lines
381 B
JavaScript
16 lines
381 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const OutgoingMessage = require('http').OutgoingMessage;
|
|
|
|
// Verify that an error is thrown upon a call to `OutgoingMessage.pipe`.
|
|
|
|
const outgoingMessage = new OutgoingMessage();
|
|
assert.throws(
|
|
() => { outgoingMessage.pipe(outgoingMessage); },
|
|
{
|
|
code: 'ERR_STREAM_CANNOT_PIPE',
|
|
name: 'Error'
|
|
}
|
|
);
|