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

27 lines
609 B
TypeScript
Raw Normal View History

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();
});
2016-11-10 21:15:16 +01:00
test('returns health good', async () => {
expect.assertions(0);
const { request, destroy } = await setupApp(stores);
await request
.get('/health')
2016-11-13 15:41:35 +01:00
.expect('Content-Type', /json/)
.expect(200)
.expect('{"health":"GOOD"}');
await destroy();
});