1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/src/test/e2e/health.e2e.test.ts
Christopher Kolstad ff7be7696c
fix: Stores as typescript and with interfaces. (#902)
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
2021-08-12 15:04:37 +02:00

27 lines
609 B
TypeScript

import { setupApp } from './helpers/test-helper';
import dbInit from './helpers/database-init';
import getLogger from '../fixtures/no-logger';
let stores;
let db;
beforeAll(async () => {
db = await dbInit('health_api', getLogger);
stores = db.stores;
});
afterAll(async () => {
await db.destroy();
});
test('returns health good', async () => {
expect.assertions(0);
const { request, destroy } = await setupApp(stores);
await request
.get('/health')
.expect('Content-Type', /json/)
.expect(200)
.expect('{"health":"GOOD"}');
await destroy();
});