|
|
|
@ -25,6 +25,7 @@ beforeAll(() => {
|
|
|
|
|
|
|
|
|
|
|
|
afterAll(() => {
|
|
|
|
afterAll(() => {
|
|
|
|
(ResponseQueue as any).add = originalAdd;
|
|
|
|
(ResponseQueue as any).add = originalAdd;
|
|
|
|
|
|
|
|
resetDb();
|
|
|
|
// Close the test database
|
|
|
|
// Close the test database
|
|
|
|
testDb.close();
|
|
|
|
testDb.close();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
@ -323,7 +324,7 @@ describe('WebhookServer', () => {
|
|
|
|
const server = await WebhookServer.start();
|
|
|
|
const server = await WebhookServer.start();
|
|
|
|
const response = await fetch('http://localhost:3007/health');
|
|
|
|
const response = await fetch('http://localhost:3007/health');
|
|
|
|
expect(response.status).toBe(200);
|
|
|
|
expect(response.status).toBe(200);
|
|
|
|
server.stop();
|
|
|
|
await server.stop();
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
process.env.PORT = originalPort;
|
|
|
|
process.env.PORT = originalPort;
|
|
|
|
process.env.EVOLUTION_API_URL = prevEnv.EVOLUTION_API_URL;
|
|
|
|
process.env.EVOLUTION_API_URL = prevEnv.EVOLUTION_API_URL;
|
|
|
|
|