1'use strict';
2const common = require('../common');
3const { Transform } = require('stream');
4const stream = new Transform({
5  transform(chunk, enc, cb) { cb(); cb(); }
6});
7
8stream.on('error', common.expectsError({
9  name: 'Error',
10  message: 'Callback called multiple times',
11  code: 'ERR_MULTIPLE_CALLBACK'
12}));
13
14stream.write('foo');
15