File size: 340 Bytes
6491ad4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
'use strict'

const { Writable } = require('stream')

// Nop console.error to avoid printing things out
console.error = () => {}

setImmediate(function () {
  throw new Error('kaboom')
})

async function run (opts) {
  const stream = new Writable({
    write (chunk, enc, cb) {
      cb()
    }
  })
  return stream
}

module.exports = run