You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
857 B
34 lines
857 B
import { renderHook } from '../../../tests/utils';
|
|
import useAnimateConfig from '../hooks/useAnimateConfig';
|
|
|
|
describe('Tabs.Animated', () => {
|
|
it('boolean: false', () => {
|
|
const { result } = renderHook(() => useAnimateConfig('test', false));
|
|
|
|
expect(result.current).toEqual({
|
|
inkBar: false,
|
|
tabPane: false,
|
|
});
|
|
});
|
|
|
|
it('boolean: true', () => {
|
|
const { result } = renderHook(() => useAnimateConfig('test', true));
|
|
|
|
expect(result.current).toEqual({
|
|
inkBar: true,
|
|
tabPane: false,
|
|
});
|
|
});
|
|
|
|
it('config', () => {
|
|
const { result } = renderHook(() => useAnimateConfig('test', { inkBar: false, tabPane: true }));
|
|
|
|
expect(result.current).toEqual({
|
|
inkBar: false,
|
|
tabPane: true,
|
|
tabPaneMotion: expect.objectContaining({
|
|
motionName: 'test-switch',
|
|
}),
|
|
});
|
|
});
|
|
});
|
|
|