Skip to content

Commit

Permalink
convert getURL fn to more ergonomic one liner
Browse files Browse the repository at this point in the history
  • Loading branch information
coetry authored and timneutkens committed Dec 12, 2018
1 parent 62c1e01 commit 85d7bd6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions test/index.js
Expand Up @@ -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, <String>)', async t => {
const fn = async (req, res) => {
Expand Down

0 comments on commit 85d7bd6

Please sign in to comment.