We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
null
Object {}
Hello! I've recently upgraded from 1.5.1 to 3.3.4 and saw that all properties that get css files have been rewritten from Object {} to null
I didn't find this change in the changelog and maybe it is a bug?
here is an example:
import React from 'react'; import LinkInner from './LinkInner'; import styles from './style.css'; class Link extends React.Component { render() { return ( <a href={this.props.page || '#'}> <LinkInner theme={styles} /> </a> ); } } export default Link;
test:
import React from 'react'; import Link from './Link'; import { shallow } from 'enzyme'; it('renders correctly', () => { const component = shallow(<Link page="http://www.facebook.com">Facebook</Link>); expect(component).toMatchSnapshot(); });
snapshot:
exports[`renders correctly 1`] = ` <a href="http://www.facebook.com" > <LinkInner theme={null} /> </a> `;
The text was updated successfully, but these errors were encountered:
There is return null in the new code of enzyme-to-json which wasn't before. If it gets object other than the react component (style object this our case) it will return null. https://github.com/adriantoine/enzyme-to-json/blob/master/src/shallow.js#L62
return null
enzyme-to-json
in the old code it returns empty object https://github.com/adriantoine/enzyme-to-json/blob/v1.5.1/src/shallow.js#L10
correct me if I'm wrong
Sorry, something went wrong.
PR are welcomed.
Prior to null behaviour, you had just an empty object ? I would be better to have the complete object with the style property.
No branches or pull requests
Hello! I've recently upgraded from 1.5.1 to 3.3.4 and saw that all properties that get css files have been rewritten from
Object {}
tonull
I didn't find this change in the changelog and maybe it is a bug?
here is an example:
test:
snapshot:
The text was updated successfully, but these errors were encountered: