-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: synchronous plugin without callback (#265)
* feat: synchronous plugin without callback * fix README.md
- Loading branch information
1 parent
3e2e854
commit 3b9e210
Showing
4 changed files
with
36 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
'use strict' | ||
|
||
const { test } = require('tap') | ||
const boot = require('..') | ||
|
||
test('not taking done does not throw error.', (t) => { | ||
t.plan(2) | ||
|
||
const app = boot() | ||
|
||
app.use(noDone).ready((err) => { | ||
t.notOk(err, 'no error') | ||
}) | ||
|
||
function noDone (s, opts) { | ||
t.pass('did not throw') | ||
} | ||
}) |