diff --git a/test/index.js b/test/index.js index 023f99c0..00d4cde5 100644 --- a/test/index.js +++ b/test/index.js @@ -8,11 +8,7 @@ const micro = require('../'); const {send, sendError, buffer, json} = micro; -const getUrl = fn => { - const srv = micro(fn); - - return listen(srv); -}; +const getUrl = fn => listen(micro(fn)); test('send(200, )', async t => { const fn = async (req, res) => {