mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
test setup
This commit is contained in:
21
backend/tests/healthcheck.test.ts
Normal file
21
backend/tests/healthcheck.test.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Server } from 'http';
|
||||
import main from '../src';
|
||||
import { describe, expect, it, beforeAll, afterAll } from '@jest/globals';
|
||||
import request from 'supertest';
|
||||
|
||||
let server: Server;
|
||||
|
||||
beforeAll(async () => {
|
||||
server = await main;
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
server.close();
|
||||
});
|
||||
|
||||
describe('Healthcheck endpoint', () => {
|
||||
it('GET /healthcheck should return OK', async () => {
|
||||
const res = await request(server).get('/healthcheck');
|
||||
expect(res.status).toEqual(200);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user