Use lumah for testing

This commit is contained in:
Wessel T
2019-02-16 15:14:29 +01:00
parent 4321401100
commit 6fd012bfe8
2 changed files with 9 additions and 4 deletions

10
test.js
View File

@@ -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();