blob: bf2ccdcde45b9ea7b460ab394977242ef6853344 (
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({
name: 'Error',
message: 'Callback called multiple times',
code: 'ERR_MULTIPLE_CALLBACK'
}));
stream.write('foo');
|