From d58ba0999a52e006f56ba6e916dab40cbef3193d Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Mon, 21 Jun 2021 20:31:18 +0300 Subject: [PATCH] test: add root path 200 test --- test/server.test.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/server.test.js diff --git a/test/server.test.js b/test/server.test.js new file mode 100644 index 0000000..4ca28e9 --- /dev/null +++ b/test/server.test.js @@ -0,0 +1,12 @@ +import test from 'ava' + +test('/ should return status up', async (t) => { + const { build } = await import('../src/server.js') + const server = await build() + const response = await server.inject({ + method: 'GET', + url: '/', + }) + + t.deepEqual(await response.json(), { status: 'up' }) +})