0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/parallel/test-outgoing-message-pipe.js

15 lines
376 B
JavaScript
Raw Normal View History

'use strict';
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();
common.expectsError(
() => { outgoingMessage.pipe(outgoingMessage); },
{
code: 'ERR_STREAM_CANNOT_PIPE',
type: Error
}
);