First commit

This commit is contained in:
2026-01-12 13:12:46 +01:00
parent b2d9501f6d
commit a1fbd8acf5
4413 changed files with 1245183 additions and 0 deletions

32
node_modules/avvio/test/after-pass-through.test.js generated vendored Normal file
View File

@@ -0,0 +1,32 @@
'use strict'
const { test } = require('tap')
const boot = require('..')
test('proper support for after with a passed async function in wrapped mode', (t) => {
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')
})
})