Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('renders correctly', () => {
const tree = renderer.create(
).toJSON();
expect(tree).toMatchSnapshot();
});
it('children in Modal', () => {
const component = renderer.create(
);
let tree = component.toJSON();
expect(tree.children[0].children[0].children[0]).toBe('Example');
});
it('render tag Touchable', () => {
const component = renderer.create(
Example
);
let tree = component.toJSON();
expect(tree.tagName).toEqual('DIV');
expect(tree.children[0]).toEqual('Example');
});
});
it('controlled Modal', () => {
const mockHideCallback = jest.fn();
const component = renderer.create(
);
jest.runAllTimers();
expect(mockHideCallback).toHaveBeenCalled();
});
});
it('should render a link', () => {
const component = renderer.create(
Example
);
let tree = component.toJSON();
expect(tree.tagName).toEqual('A');
expect(tree.children[0].tagName).toEqual('TEXT');
expect(tree.children[0].attributes.value).toEqual('Example');
});
});
it('render tag TextInput', () => {
const component = renderer.create(
);
let tree = component.toJSON();
expect(tree.tagName).toEqual('INPUT');
});
beforeEach(() => {
component = renderer.create(
);
});
it('should render a switch', () => {
describe('tabheader', () => {
const component = renderer.create(
{
return ;
}}
renderSelect={(item, index) => {
return ;
}}
onPress={(index) => {}}
onSelect={(index) => {}}
selected={0}
itemWidth={166}
dropDownCols={4}
type={'dropDown-border-scroll'} />
);
beforeEach(() => {
component1 = renderer.create(
);
component2 = renderer.create(
);
});
beforeEach(() => {
component = renderer.create(
);
});