@telstra/messaging
Version:
Telstra SDK Messaging
21 lines (18 loc) • 789 B
text/typescript
import { afterAll, afterEach, beforeAll, describe, expect, it } from 'vitest';
import { HealthCheck } from '../../../src/classes/index.js';
import { Constants } from '../../shared/Constants.js';
import AUTH_CONFIG from '../../shared/credentials.json' with { type: 'json' };
import { server } from '../../shared/mswServer.js';
const healthCheck = new HealthCheck(AUTH_CONFIG);
beforeAll(() => server.listen());
afterEach(() => server.resetHandlers());
afterAll(() => server.close());
describe('HealthCheck', () => {
describe('fetch health-check', () => {
describe('when the client retrieves health-check', () => {
it('should return a result', async () => {
await expect(healthCheck.get()).resolves.toEqual(Constants.HEALTH_CHECK_RESPONSE);
});
});
});
});