Projektstart
This commit is contained in:
22
backend/node_modules/avvio/test/twice-done.test.js
generated
vendored
Normal file
22
backend/node_modules/avvio/test/twice-done.test.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
'use strict'
|
||||
|
||||
const { test } = require('tap')
|
||||
const boot = require('..')
|
||||
|
||||
test('calling done twice does not throw error', (t) => {
|
||||
t.plan(2)
|
||||
|
||||
const app = boot()
|
||||
|
||||
app
|
||||
.use(twiceDone)
|
||||
.ready((err) => {
|
||||
t.notOk(err, 'no error')
|
||||
})
|
||||
|
||||
function twiceDone (s, opts, done) {
|
||||
done()
|
||||
done()
|
||||
t.pass('did not throw')
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user