From 194a54c6e8df917691b5162a12cf6002f28e2862 Mon Sep 17 00:00:00 2001 From: asvarcas Date: Mon, 6 Dec 2021 14:25:01 -0300 Subject: [PATCH] Fix types in tests --- .../dataProvider/convertLegacyDataProvider.spec.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/ra-core/src/dataProvider/convertLegacyDataProvider.spec.ts b/packages/ra-core/src/dataProvider/convertLegacyDataProvider.spec.ts index 68371ed9f3b..e7e715cf33a 100644 --- a/packages/ra-core/src/dataProvider/convertLegacyDataProvider.spec.ts +++ b/packages/ra-core/src/dataProvider/convertLegacyDataProvider.spec.ts @@ -14,9 +14,17 @@ describe('convertLegacyDataProvider', () => { it('should return an object allowing new style calls', () => { const legacyProvider = jest.fn(); const convertedProvider = convertLegacyDataProvider(legacyProvider); - convertedProvider.getList('posts', { filter: { foo: 'bar' } }); - expect(legacyProvider).toHaveBeenCalledWith('GET_LIST', 'posts', { + convertedProvider.getList('posts', { filter: { foo: 'bar' }, + pagination: { page: 1, perPage: 10 }, + sort: { field: 'id', order: 'ASC' }, }); + expect(legacyProvider).toHaveBeenCalledWith( + 'GET_LIST', + 'posts', + expect.objectContaining({ + filter: { foo: 'bar' }, + }) + ); }); });