Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
expect(() => {
var element = createFactory(ComponentClass)({
key: '12',
ref: '34',
foo: '56',
});
var props = {
key: undefined,
ref: undefined,
foo: 'ef',
};
var clone = cloneElement(element, props);
expect(clone.type).toBe(ComponentClass);
expect(clone.key).toBe('12');
expect(clone.ref).toBe('34');
expect(clone.props).toEqual({foo: 'ef'});
}).toWarnDev('Adding a string ref "34" that was not created inside render method, or multiple copies of Rax are used.', {withoutStack: true});
});