aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/forms/motion-toggle/motion-toggle.test.tsx
blob: 614c0383dfd089756f47de12a902a3717b06ee9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { render, screen } from '../../../../../tests/utils';
import { MotionToggle } from './motion-toggle';
import { storageKey } from './motion-toggle.fixture';

describe('MotionToggle', () => {
  // toHaveValue received undefined. Maybe because of localStorage hook...
  it('renders a toggle component', () => {
    render(<MotionToggle storageKey={storageKey} defaultValue="on" />);
    expect(
      screen.getByRole('radiogroup', {
        name: /Animations:/i,
      })
    ).toBeInTheDocument();
  });
});