blob: 049b41c9aaa903d9087a6a8976bdb15280279086 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
'use strict';
require('../common');
const assert = require('assert');
const OutgoingMessage = require('_http_outgoing').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'
}
);
|