all repos — archive/homestead @ da9ff90d3e1b1348c43cd378c0806e159a700810

My future indieweb platform

test/index.test.js (view raw)

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())
})