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