• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2const common = require('../common');
3const { Writable } = require('stream');
4const stream = new Writable({
5  write(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