import React from 'react';
import { create } from 'react-test-renderer';
import { Switch } from '..';
describe('Default', () => {
test('Not checked', () => {
const tree = create(
);
expect(tree.toJSON()).toMatchSnapshot();
});
test('With ID', () => {
const tree = create(
);
expect(tree.toJSON()).toMatchSnapshot();
});
test('Not checked & disabled', () => {
const tree = create(
);
expect(tree.toJSON()).toMatchSnapshot();
});
test('Checked', () => {
const tree = create(
);
expect(tree.toJSON()).toMatchSnapshot();
});
test('Checked & disabled', () => {
const tree = create(
);
expect(tree.toJSON()).toMatchSnapshot();
});
});
describe('Label', () => {
const PROPS = {
name : 'default',
label: 'Checkbox label'
};
test('Not checked', () => {
const tree = create(
);
expect(tree.toJSON()).toMatchSnapshot();
});
test('Not checked & disabled', () => {
const tree = create(
);
expect(tree.toJSON()).toMatchSnapshot();
});
test('Checked', () => {
const tree = create(
);
expect(tree.toJSON()).toMatchSnapshot();
});
test('Checked & disabled', () => {
const tree = create(
);
expect(tree.toJSON()).toMatchSnapshot();
});
});
describe('Label & Description', () => {
const PROPS = {
name : 'default',
label : 'Checkbox label',
description: 'Checkbox description'
};
test('Not checked', () => {
const tree = create(
);
expect(tree.toJSON()).toMatchSnapshot();
});
test('Not checked & disabled', () => {
const tree = create(
);
expect(tree.toJSON()).toMatchSnapshot();
});
test('Checked', () => {
const tree = create(
);
expect(tree.toJSON()).toMatchSnapshot();
});
test('Checked & disabled', () => {
const tree = create(
);
expect(tree.toJSON()).toMatchSnapshot();
});
});