@zohodesk/components
Version:
Dot UI is a customizable React component library built to deliver a clean, accessible, and developer-friendly UI experience. It offers a growing set of reusable components designed to align with modern design systems and streamline application development
30 lines • 834 B
JavaScript
import React from 'react';
import { render } from '@testing-library/react';
import Switch from "../Switch";
describe('Switch', () => {
test('rendering the defult props', () => {
const {
asFragment
} = render( /*#__PURE__*/React.createElement(Switch, null));
expect(asFragment()).toMatchSnapshot();
});
test('rendering the Switch with Checked', () => {
const {
asFragment
} = render( /*#__PURE__*/React.createElement(Switch, {
id: "switch",
isChecked: true
}));
expect(asFragment()).toMatchSnapshot();
});
test('rendering the Switch with Disabled', () => {
const {
asFragment
} = render( /*#__PURE__*/React.createElement(Switch, {
id: "switch",
isChecked: true,
isDisabled: true
}));
expect(asFragment()).toMatchSnapshot();
});
});