You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

15 lines
504 B

'use strict';
const assert = require('assert');
const common = require('../common');
const OutgoingMessage = require('_http_outgoing').OutgoingMessage;
// Verify that an error is thrown upon a call to `OutgoingMessage.pipe`.
const outgoingMessage = new OutgoingMessage();
assert.throws(
common.mustCall(() => { outgoingMessage.pipe(outgoingMessage); }),
(err) => {
return ((err instanceof Error) && /Cannot pipe, not readable/.test(err));
},
'OutgoingMessage.pipe should throw an error'
);