Your IP : 13.58.105.80


Current Path : /opt/alt/alt-nodejs9/root/lib/node_modules/npm/node_modules.bundled/tar/node_modules/minipass/
Upload File :
Current File : //opt/alt/alt-nodejs9/root/lib/node_modules/npm/node_modules.bundled/tar/node_modules/minipass/e.js

const MP = require('stream').PassThrough // require('./')
const mp = new MP()
const wait = (n) => new Promise(resolve => setTimeout(resolve, n))
const t = require('tap')

t.test('end ordering', async t => {
  mp.on('end', _ => console.log('end'))
  mp.end()
  console.log('called end')
  // mp.resume()
  // console.log('called resume()')
  // mp.read()
  // console.log('called read')
  mp.on('data', _=>_)
  console.log('added data handler')
  await wait(1)
})

?>