blob: ebac87db3ec6d95b58f57ecd9d4ecd4f4c0ab8d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
const test = require('ava')
const path = require('path')
const request = require('supertest')
process.env.POST_DIR = path.resolve(__dirname, '../test/data/')
const app = require('../src/index.js')
test(t => {
return request(app.listen())
.get('/')
.expect(200)
.expect(/hello world/)
.expect(/This is a test/)
.then(() => t.pass())
})
|