import { jest } from '@jest/globals' import { expect as c_expect } from 'chai' import { Request, Response } from 'express' import HealthHandler from '../../../../src/Server/lib/container/HealthHandler.js' function observableResponse(): Response { const resp = ({ send: jest.fn(() => resp), json: jest.fn(() => resp), status: jest.fn(() => resp), header: jest.fn(() => resp), }) return resp } describe('HealthHandler invocation path', () => { test('Simple', async () => { const resp = observableResponse() const handlerResp = await HealthHandler(({}), resp) // c_expect(handlerResp).to.be.undefined expect(resp.send).toBeCalledWith('Healthy!') expect(resp.json).not.toBeCalled() expect(resp.status).not.toBeCalled() expect(resp.header).not.toBeCalled() }) }) export {}