Skip to content
Permalink
0d4fbe7158
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
23 lines (19 sloc) 622 Bytes
'use strict'
const request = require('supertest')
const server = require('../index.js')
const status = require('http-status-codes')
afterAll( () => server.close())
describe('GET /', () => {
test('the page should return a status code of "200 OK"', async done => {
expect.assertions(1)
const response = await request(server).get('/')
expect(response.status).toEqual(status.OK)
done()
})
test('we should see the text "Hello World" displayed', async done => {
expect.assertions(1)
const response = await request(server).get('/')
expect(response.text).toEqual('Hello World')
done()
})
})