Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('checked disabled', () => {
const component: RenderAPI = renderComponent({
checked: true,
disabled: true,
});
const { output } = shallow(component.getByType(Radio));
expect(output).toMatchSnapshot();
});
it('* modal panel renders properly', () => {
const component: RenderAPI = render(
,
);
const { output } = shallow(component.getByType(ModalPanel));
expect(output).toMatchSnapshot();
});
it('* active', async () => {
const component: RenderAPI = renderComponent();
fireEvent(component.getByType(TouchableOpacity), 'pressIn');
const active: ReactTestInstance = await waitForElement(() => {
return component.getByType(CheckBox);
});
const { output: activeOutput } = shallow(active);
fireEvent(component.getByType(TouchableOpacity), 'pressOut');
const inactive: ReactTestInstance = await waitForElement(() => {
return component.getByType(CheckBox);
});
const { output: inactiveOutput } = shallow(inactive);
expect(activeOutput).toMatchSnapshot();
expect(inactiveOutput).toMatchSnapshot('default');
});
it('* default', () => {
const component: RenderAPI = renderComponent();
const { output } = shallow(component.getByType(CheckBox));
expect(output).toMatchSnapshot();
});
it('* active', async () => {
const component: RenderAPI = renderComponent();
fireEvent(component.getByType(TouchableOpacity), 'pressIn');
const active: ReactTestInstance = await waitForElement(() => {
return component.getByType(CheckBox);
});
const { output: activeOutput } = shallow(active);
fireEvent(component.getByType(TouchableOpacity), 'pressOut');
const inactive: ReactTestInstance = await waitForElement(() => {
return component.getByType(CheckBox);
});
const { output: inactiveOutput } = shallow(inactive);
expect(activeOutput).toMatchSnapshot();
expect(inactiveOutput).toMatchSnapshot('default');
});
it('* description', () => {
const item = () => {
return (
);
};
const component: RenderAPI = render(
,
);
const items: ReactTestInstance[] = component.getAllByType(ListItem);
const { output } = shallow(items[0]);
expect(output).toMatchSnapshot();
});
it('default', () => {
const component: RenderAPI = renderComponent();
const { output } = shallow(component.getByType(Layout));
expect(output).toMatchSnapshot();
});
it('* modal panel renders properly', () => {
const component: RenderAPI = render(
,
);
const { output } = shallow(component.getByType(ModalPanel));
expect(output).toMatchSnapshot();
});
it('* default', () => {
const component: RenderAPI = renderComponent({
source: iconSource,
});
const { output } = shallow(component.getByType(Avatar));
expect(output).toMatchSnapshot();
});
<img style="{style}">
);
};
const label: string = 'Label';
const caption: string = 'Caption Text';
const component: RenderAPI = renderComponent({
label,
caption,
captionIcon,
});
const { output } = shallow(component.getByType(Input));
expect(output).toMatchSnapshot();
});