From 86c3587372ff6f2649cde82dabc01cf90333ab1d Mon Sep 17 00:00:00 2001 From: ghiscoding Date: Mon, 8 May 2023 14:38:11 -0400 Subject: [PATCH] tests: fix failing unit tests --- .../src/__tests__/slick-pagination-without-i18n.spec.ts | 2 +- .../src/__tests__/slick-pagination.spec.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/pagination-component/src/__tests__/slick-pagination-without-i18n.spec.ts b/packages/pagination-component/src/__tests__/slick-pagination-without-i18n.spec.ts index 18885182c..7731b0140 100644 --- a/packages/pagination-component/src/__tests__/slick-pagination-without-i18n.spec.ts +++ b/packages/pagination-component/src/__tests__/slick-pagination-without-i18n.spec.ts @@ -107,7 +107,7 @@ describe('Slick-Pagination Component', () => { expect(translateService.getCurrentLanguage()).toBe('en'); expect(removeExtraSpaces(pageInfoFromTo.innerHTML)).toBe('10-15 of '); - expect(removeExtraSpaces(pageInfoTotalItems.innerHTML)).toBe('95 items '); + expect(removeExtraSpaces(pageInfoTotalItems.innerHTML)).toBe('95 items '); component.dispose(); }); }); diff --git a/packages/pagination-component/src/__tests__/slick-pagination.spec.ts b/packages/pagination-component/src/__tests__/slick-pagination.spec.ts index 6dc56d702..6a5fe9443 100644 --- a/packages/pagination-component/src/__tests__/slick-pagination.spec.ts +++ b/packages/pagination-component/src/__tests__/slick-pagination.spec.ts @@ -97,7 +97,7 @@ describe('Slick-Pagination Component', () => { expect(translateService.getCurrentLanguage()).toBe('en'); expect(removeExtraSpaces(pageInfoFromTo.innerHTML)).toBe('10-15 of '); - expect(removeExtraSpaces(pageInfoTotalItems.innerHTML)).toBe('95 items '); + expect(removeExtraSpaces(pageInfoTotalItems.innerHTML)).toBe('95 items '); expect(itemsPerPage.selectedOptions[0].value).toBe('5'); }); @@ -256,7 +256,7 @@ describe('with different i18n locale', () => { it('should throw an error when enabling translate without a Translate Service', () => { mockGridOptions.enableTranslate = true; - expect(() => new SlickPaginationComponent(paginationServiceStub, eventPubSubService, sharedService, null)) + expect(() => new SlickPaginationComponent(paginationServiceStub, eventPubSubService, sharedService, null as any)) .toThrow('[Slickgrid-Universal] requires a Translate Service to be installed and configured when the grid option "enableTranslate" is enabled.'); }); @@ -269,7 +269,7 @@ describe('with different i18n locale', () => { const pageInfoTotalItems = document.querySelector('.page-info-total-items') as HTMLSpanElement; expect(translateService.getCurrentLanguage()).toBe('fr'); expect(removeExtraSpaces(pageInfoFromTo.innerHTML)).toBe(`10-15 de `); - expect(removeExtraSpaces(pageInfoTotalItems.innerHTML)).toBe(`95 éléments `); + expect(removeExtraSpaces(pageInfoTotalItems.innerHTML)).toBe(`95 éléments `); done(); }, 50); });