-
-
Save idettman/1677f73deb047f72e5706361b8ab1e1e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const test = require('tap').test | |
const server = { | |
inject: options => new Promise(r => r({ statusCode: 200, payload: 'Hello world' })) | |
} | |
test('Home entry', async t => { | |
const options = { | |
method: 'GET', | |
url: '/' | |
} | |
const response = await server.inject(options) | |
t.equal(response.statusCode, 200, 'status code = 200') | |
t.equal(response.payload, 'Hello world', 'Text must be Hello world') | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment