src/index.test.js (view raw)
1 2 3 4 5 6 7 8 9 10 11 12
const test = require('ava') const request = require('supertest') const app = require('./index.js') test(t => request(app.listen()) .get('/') .expect(200) .expect(/hello world/) .then(() => t.pass()) )