API/test: Remove getVersion() Axios call
This removes `getVersion()` API call previously used in Axios.
This commit is contained in:
parent
27ebbdb24a
commit
850e77eb01
2 changed files with 0 additions and 9 deletions
|
|
@ -37,16 +37,9 @@ async function getPackagesContentSources(repoUrls, search) {
|
|||
return packages;
|
||||
}
|
||||
|
||||
async function getVersion() {
|
||||
const path = '/version';
|
||||
const request = await axios.get(IMAGE_BUILDER_API.concat(path));
|
||||
return request.data;
|
||||
}
|
||||
|
||||
const apiCalls = {
|
||||
getPackages,
|
||||
getPackagesContentSources,
|
||||
getVersion,
|
||||
};
|
||||
|
||||
export default apiCalls;
|
||||
|
|
|
|||
|
|
@ -24,8 +24,6 @@ describe('Landing Page', () => {
|
|||
test('renders page heading', async () => {
|
||||
renderWithReduxRouter('', {});
|
||||
|
||||
const composeImage = jest.spyOn(api, 'getVersion');
|
||||
composeImage.mockResolvedValue({ version: '1.0' });
|
||||
// check heading
|
||||
screen.getByRole('heading', { name: /Image Builder/i });
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue