mirror of
https://github.com/Wessel/wumpfetch.git
synced 2026-07-06 16:03:36 +02:00
Use lumah for testing
This commit is contained in:
10
test.js
10
test.js
@@ -1,6 +1,10 @@
|
||||
const u = require('util');
|
||||
const l = require('lumah');
|
||||
const w = require('./createRequest.js');
|
||||
|
||||
;( async() => {
|
||||
l.register('Fetch a cat image', async (end) => {
|
||||
const r = await w({ url: 'https://aws.random.cat/meow', parse: 'json' }).send();
|
||||
console.log(r.body);
|
||||
})();
|
||||
end(r.statusCode === 200 ? true : false, r.statusCode === 200 ? u.inspect(r.body) : r.statusCode);
|
||||
});
|
||||
|
||||
l.start();
|
||||
Reference in New Issue
Block a user