Skip to content

Commit

Permalink
fix: tests typings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Freisler committed Sep 5, 2021
1 parent 9f673f0 commit 73c1b5f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/core/src/index.spec.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ describe('handleOverflow', () => {
beforeEach(() => carousel.config.overflow = false);

it('shouldn\'t call goTo', () => {
carousel.handleOverflow();
(carousel as unknown as {handleOverflow: ()=> void}).handleOverflow();
expect(goToSpy).not.toHaveBeenCalled();
});
});
Expand All @@ -346,7 +346,7 @@ describe('handleOverflow', () => {
describe('when config.items.length === 0', () => {
it('shouldn\'t call goTo', () => {
carousel.config.items = [];
carousel.handleOverflow();
(carousel as unknown as {handleOverflow: ()=> void}).handleOverflow();
expect(goToSpy).not.toHaveBeenCalled();
});
});
Expand All @@ -356,7 +356,7 @@ describe('handleOverflow', () => {
afterAll(() => findXSnapIndexMock.mockImplementation(findXSnapIndexActual));
beforeEach(() => {
carousel.resetActive();
carousel.handleOverflow();
(carousel as unknown as {handleOverflow: ()=> void}).handleOverflow();
});

it('should call goTo with this.active', () => {
Expand All @@ -369,7 +369,7 @@ describe('handleOverflow', () => {
afterAll(() => findXSnapIndexMock.mockImplementation(findXSnapIndexActual));
beforeEach(() => {
carousel.resetActive();
carousel.handleOverflow();
(carousel as unknown as {handleOverflow: ()=> void}).handleOverflow();
});

it('should call goTo with this.active', () => {
Expand All @@ -382,7 +382,7 @@ describe('handleOverflow', () => {
afterAll(() => findXSnapIndexMock.mockImplementation(findXSnapIndexActual));
beforeEach(() => {
carousel.resetActive();
carousel.handleOverflow();
(carousel as unknown as {handleOverflow: ()=> void}).handleOverflow();
});

it('shouldn\'t call goTo', () => {
Expand Down

0 comments on commit 73c1b5f

Please sign in to comment.