Add a simple sanity test to the search-backend plugin.

Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
Eric Peterson
2021-02-16 15:13:43 +01:00
parent 1e82240ec3
commit ca74761fce
@@ -34,12 +34,12 @@ describe('createRouter', () => {
jest.resetAllMocks();
});
describe('GET /health', () => {
it('returns ok', async () => {
const response = await request(app).get('/health');
describe('GET /query', () => {
it('returns empty results array', async () => {
const response = await request(app).get('/query');
expect(response.status).toEqual(200);
expect(response.body).toEqual({ status: 'ok' });
expect(response.body).toMatchObject({ results: [] });
});
});
});