mirror of
https://github.com/nodejs/node.git
synced 2025-05-05 12:04:25 +00:00

PR-URL: https://github.com/nodejs/node/pull/13310 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
16 lines
439 B
JavaScript
16 lines
439 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const { Transform } = require('stream');
|
|
const stream = new Transform({
|
|
transform(chunk, enc, cb) { cb(); cb(); }
|
|
});
|
|
|
|
stream.on('error', common.mustCall((err) => {
|
|
assert.strictEqual(err.toString(),
|
|
'Error [ERR_TRANSFORM_MULTIPLE_CALLBACK]: ' +
|
|
'Callback called multiple times');
|
|
}));
|
|
|
|
stream.write('foo');
|