Skip to content

Commit

Permalink
tests: fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Dec 15, 2020
1 parent c65ec69 commit 7c9eddb
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
Editor,
ExtensionName,
ColumnFilter,
SlickEventHandler,
} from '@slickgrid-universal/common';
import { GraphqlService, GraphqlPaginatedResult, GraphqlServiceApi, GraphqlServiceOption } from '@slickgrid-universal/graphql';
import { SlickCompositeEditorComponent } from '@slickgrid-universal/composite-editor-component';
Expand All @@ -57,7 +58,7 @@ const mockConvertParentChildArray = jest.fn();
(backendUtilities.onBackendError as any) = mockBackendError;

declare const Slick: any;
const slickEventHandler = new MockSlickEventHandler();
const slickEventHandler = new MockSlickEventHandler() as SlickEventHandler;

const extensionServiceStub = {
bindDifferentExtensions: jest.fn(),
Expand Down Expand Up @@ -886,7 +887,7 @@ describe('Slick-Vanilla-Grid-Bundle Component instantiated via Constructor', ()
component.initialization(divContainer, slickEventHandler);

expect(TextExportService).toHaveBeenCalled();
expect(component.registeredResources.length).toBe(3); // TextExportService, GridService, GridStateService
expect(component.registeredResources.length).toBe(4); // TextExportService, GridService, GridStateService, SlickEmptyCompositeEditorComponent
expect(component.registeredResources[0] instanceof TextExportService).toBeTrue();
});

Expand Down

0 comments on commit 7c9eddb

Please sign in to comment.