benchmark: Fix crash in net benchmarks by matthewloring · Pull Request #6407 · nodejs/node

Checklist
  • tests and code linting passes
    • test-tick-processor/test-domain-no-error-handler-abort-on-uncaught
      are failing but these should be unrelated.
  • a test and/or benchmark is included
  • the commit message follows commit guidelines
Affected core subsystem(s)

benchmark

Description of change

Net benchmarks create partial event emitters that do not have all of the
required event emitter functions. They currently mock out on, once,
and emit functions. This change mocks out prependListener as well to
avoid crashing in _stream_readable.

Fixes #6405