26 lines
753 B
TypeScript
26 lines
753 B
TypeScript
/*
|
|
* File: dicomAPI.test.ts
|
|
* Description: Test for dicomAPI service
|
|
* Design & Developed by Tech4Biz Solutions
|
|
* Copyright (c) Spurrin Innovations. All rights reserved.
|
|
*/
|
|
|
|
import { dicomAPI } from '../services/dicomAPI';
|
|
|
|
jest.mock('apisauce', () => ({
|
|
create: () => ({ get: jest.fn(() => Promise.resolve({ ok: true, data: ['image1.png', 'image2.png'] })) })
|
|
}));
|
|
|
|
describe('dicomAPI', () => {
|
|
it('calls getImages and returns data', async () => {
|
|
const response = await dicomAPI.getImages('1');
|
|
expect(response.ok).toBe(true);
|
|
expect(Array.isArray(response.data)).toBe(true);
|
|
});
|
|
});
|
|
|
|
/*
|
|
* End of File: dicomAPI.test.ts
|
|
* Design & Developed by Tech4Biz Solutions
|
|
* Copyright (c) Spurrin Innovations. All rights reserved.
|
|
*/
|