Sindbad~EG File Manager

Current Path : /home/infinitibizsol/irfarms.infinitibizsol.com/node_modules/avvio/test/
Upload File :
Current File : /home/infinitibizsol/irfarms.infinitibizsol.com/node_modules/avvio/test/after-pass-through.test.js

'use strict'

const t = require('tap')
const boot = require('..')
const app = {}

boot(app)

t.plan(5)

const e = new Error('kaboom')

app.use(function (f, opts) {
  return Promise.reject(e)
}).after(function (err, cb) {
  t.equal(err, e)
  cb(err)
}).after(function () {
  t.pass('this is just called')
}).after(function (err, cb) {
  t.equal(err, e)
  cb(err)
})

app.ready().then(() => {
  t.fail('this should not be called')
}).catch(err => {
  t.ok(err)
  t.equal(err.message, 'kaboom')
})

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists