• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2
3const common = require('../common');
4const {
5  Duplex,
6} = require('stream');
7
8{
9  class Foo extends Duplex {
10    _final(callback) {
11      throw new Error('fhqwhgads');
12    }
13
14    _read() {}
15  }
16
17  const foo = new Foo();
18  foo._write = common.mustCall((chunk, encoding, cb) => {
19    cb();
20  });
21  foo.end('test', common.expectsError({ message: 'fhqwhgads' }));
22  foo.on('error', common.mustCall());
23}
24