Skip to content

Commit

Permalink
test: add test coverages
Browse files Browse the repository at this point in the history
  • Loading branch information
alisher-epam committed Nov 21, 2024
1 parent 7c50bb9 commit b18b98a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/utils/api/api.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
SEARCH_PARAMETER,
} from '../../AcqList/constants';
import {
ACQUISITIONS_UNITS_API,
LIMIT_MAX,
LINES_API,
ORDER_PIECES_API,
Expand All @@ -11,6 +12,7 @@ import {
VENDORS_API,
} from '../../constants';

import { fetchAcqUnitsByIds } from './fetchAcqUnitsByIds';
import { fetchOrderLines } from './fetchOrderLines';
import { fetchOrderLinesByIds } from './fetchOrderLinesByIds';
import { fetchOrders } from './fetchOrders';
Expand Down Expand Up @@ -110,4 +112,12 @@ describe('API utils', () => {
expect(httpClient.get).toHaveBeenCalledWith(RECEIVING_TITLES_API, { searchParams });
});
});

describe('fetchAcqUnitsByIds', () => {
it('should fetch acquisitions units by ids', async () => {
await fetchAcqUnitsByIds(httpClient)(ids);

expect(httpClient.get).toHaveBeenCalledWith(ACQUISITIONS_UNITS_API, { searchParams });
});
});
});

0 comments on commit b18b98a

Please sign in to comment.