mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
AAE-30882 Reduce imports to specfile
This commit is contained in:
@@ -19,7 +19,7 @@ import { SuperagentHttpClient } from '../src/superagentHttpClient';
|
|||||||
import { FetchResponse, ofetch } from 'ofetch';
|
import { FetchResponse, ofetch } from 'ofetch';
|
||||||
import { RequestOptions } from '../src/api-clients/http-client.interface';
|
import { RequestOptions } from '../src/api-clients/http-client.interface';
|
||||||
import { Emitters } from '@alfresco/adf-core/api';
|
import { Emitters } from '@alfresco/adf-core/api';
|
||||||
import * as utils from '../src/utils';
|
import { isBrowser } from '../src/utils';
|
||||||
|
|
||||||
jest.mock('ofetch', () => ({
|
jest.mock('ofetch', () => ({
|
||||||
ofetch: jest.fn()
|
ofetch: jest.fn()
|
||||||
@@ -177,7 +177,7 @@ describe('SuperagentHttpClient', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Override isBrowser to simulate a non-browser environment
|
// Override isBrowser to simulate a non-browser environment
|
||||||
(utils.isBrowser as jest.Mock).mockReturnValue(false);
|
(isBrowser as jest.Mock).mockReturnValue(false);
|
||||||
|
|
||||||
const request = client['buildRequest']({
|
const request = client['buildRequest']({
|
||||||
httpMethod,
|
httpMethod,
|
||||||
|
Reference in New Issue
Block a user