import React from 'react';
import renderer from 'react-test-renderer';
import { Switch } from '../../../';

describe('Switch Component', () => {
    it('renders correctly with label and value true', () => {
        const tree = renderer.create(<Switch value={true} onValueChange={() => {}} label="Example Label" />).toJSON();
        expect(tree).toMatchSnapshot();
    });

    it('renders correctly with label and value false', () => {
        const tree = renderer.create(<Switch value={false} onValueChange={() => {}} label="Example Label" />).toJSON();
        expect(tree).toMatchSnapshot();
    });

    it('renders correctly without label and value true', () => {
        const tree = renderer.create(<Switch value={true} onValueChange={() => {}} />).toJSON();
        expect(tree).toMatchSnapshot();
    });

    it('renders correctly without label and value false', () => {
        const tree = renderer.create(<Switch value={false} onValueChange={() => {}} />).toJSON();
        expect(tree).toMatchSnapshot();
    });
});
