mirror of
https://github.com/nodejs/node.git
synced 2025-05-02 17:01:08 +00:00

1) Add missing lazy assert call 2) Remove obsolete error type 3) Name undocumented error type more appropriate 4) Consolidate error type style (rely on util.format instead of using a function) 5) Uppercase the first letter from error messages 6) Improve some internal error parameters PR-URL: https://github.com/nodejs/node/pull/13857 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
15 lines
332 B
JavaScript
15 lines
332 B
JavaScript
'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');
|