You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
350 B
23 lines
350 B
4 years ago
|
'use strict'
|
||
|
|
||
|
const test = require('tap').test
|
||
|
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')
|
||
|
}
|
||
|
})
|