diff --git a/packages/core/client/src/testUtils/mockAPIClient.ts b/packages/core/client/src/testUtils/mockAPIClient.ts index 5b77afe4ce..2bff3a3e8a 100644 --- a/packages/core/client/src/testUtils/mockAPIClient.ts +++ b/packages/core/client/src/testUtils/mockAPIClient.ts @@ -8,6 +8,7 @@ */ import { APIClient } from '../api-client'; +import { Application } from '../application'; class MockAPIClient extends APIClient { mockAdapter() { @@ -18,6 +19,9 @@ class MockAPIClient extends APIClient { export const mockAPIClient = () => { const apiClient = new MockAPIClient(); + const app = new Application(); + apiClient.app = app; + const mockRequest = apiClient.mockAdapter(); return { apiClient, mockRequest }; }; diff --git a/packages/core/client/src/variables/__tests__/useVariables.test.tsx b/packages/core/client/src/variables/__tests__/useVariables.test.tsx index b6852af739..4d3a839dd7 100644 --- a/packages/core/client/src/variables/__tests__/useVariables.test.tsx +++ b/packages/core/client/src/variables/__tests__/useVariables.test.tsx @@ -129,7 +129,7 @@ mockRequest.onGet('/users/0/belongsToField:get').reply(() => { }, ]; }); -mockRequest.onGet('/users/0/hasManyField:list?pageSize=9999').reply(() => { +mockRequest.onGet('/users/0/hasManyField:list?paginate=false').reply(() => { return [ 200, { @@ -142,7 +142,7 @@ mockRequest.onGet('/users/0/hasManyField:list?pageSize=9999').reply(() => { }, ]; }); -mockRequest.onGet('/users/0/belongsToManyField:list?pageSize=9999').reply(() => { +mockRequest.onGet('/users/0/belongsToManyField:list?paginate=false').reply(() => { return [ 200, { @@ -156,7 +156,7 @@ mockRequest.onGet('/users/0/belongsToManyField:list?pageSize=9999').reply(() => }, ]; }); -mockRequest.onGet('/test/0/hasManyField:list?pageSize=9999').reply(() => { +mockRequest.onGet('/test/0/hasManyField:list?paginate=false').reply(() => { return [ 200, {