Skip to content

Commit 85d7bd6

Browse files
coetrytimneutkens
authored andcommitted
convert getURL fn to more ergonomic one liner
1 parent 62c1e01 commit 85d7bd6

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

test/index.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@ const micro = require('../');
88

99
const {send, sendError, buffer, json} = micro;
1010

11-
const getUrl = fn => {
12-
const srv = micro(fn);
13-
14-
return listen(srv);
15-
};
11+
const getUrl = fn => listen(micro(fn));
1612

1713
test('send(200, <String>)', async t => {
1814
const fn = async (req, res) => {

0 commit comments

Comments
 (0)