1
0
mirror of https://github.com/bigchaindb/github-projects.git synced 2024-12-29 16:17:49 +01:00
github-projects/test/index.js

18 lines
405 B
JavaScript
Raw Normal View History

2017-05-08 20:46:26 +02:00
import micro from 'micro'
import test from 'ava'
import listen from 'test-listen'
import request from 'request-promise'
test('it works', async t => {
const service = micro(async (req, res) => {
2018-09-04 13:40:36 +02:00
await micro.send(res, 200, {
2017-05-08 20:46:26 +02:00
test: 'woot'
})
})
const url = await listen(service)
const body = await request(url)
t.deepEqual(JSON.parse(body).test, 'woot')
})