mirror of
https://github.com/Unleash/unleash.git
synced 2024-11-01 19:07:38 +01:00
ff7be7696c
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
27 lines
609 B
TypeScript
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();
|
|
});
|