|
|
@ -304,8 +304,8 @@ describe('<Carousel />', () => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
it('should invoke beforeChange when beforeChange prop is defined on slide', async () => { |
|
|
|
it('should invoke beforeChange when beforeChange prop is defined on slide', async () => { |
|
|
|
const onBeforeChange = (direction: SlideDirection) => { |
|
|
|
const onBeforeChange = (_: SlideDirection) => { |
|
|
|
console.log(direction); |
|
|
|
return; |
|
|
|
}; |
|
|
|
}; |
|
|
|
const stub = jest.fn(onBeforeChange); |
|
|
|
const stub = jest.fn(onBeforeChange); |
|
|
|
const { getByTestId } = render( |
|
|
|
const { getByTestId } = render( |
|
|
@ -328,8 +328,8 @@ describe('<Carousel />', () => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
it('should invoke afterChange when afterChange prop is defined on slide', async () => { |
|
|
|
it('should invoke afterChange when afterChange prop is defined on slide', async () => { |
|
|
|
const onAfterChange = (direction: SlideDirection) => { |
|
|
|
const onAfterChange = (_: SlideDirection) => { |
|
|
|
console.log(direction); |
|
|
|
return; |
|
|
|
}; |
|
|
|
}; |
|
|
|
const stub = jest.fn(onAfterChange); |
|
|
|
const stub = jest.fn(onAfterChange); |
|
|
|
const { getByTestId } = render( |
|
|
|
const { getByTestId } = render( |
|
|
|