From 85d7bd6302345957e13831f1f1f811eb9f69909d Mon Sep 17 00:00:00 2001 From: Allen Hai Date: Wed, 24 Oct 2018 00:09:41 -0500 Subject: [PATCH] convert getURL fn to more ergonomic one liner --- test/index.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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) => {