Skip to content

chore(warnings): Remove test warning about type should not be null #374

New issue

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

Merged
merged 1 commit into from
Oct 28, 2015

Conversation

pixelastic
Copy link
Contributor

The warning Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components). was caused by
calling the test decorator on <div /> instead of 'div'.

As the message suggest, we should use strings for basic DOM elements.

The warning `Warning: React.createElement: type should not be null,
undefined, boolean, or number. It should be a string (for DOM
elements) or a ReactClass (for composite components).` was caused by
calling the test decorator on `<div />` instead of `'div'`.

As the message suggest, we should use strings for basic DOM elements.
@redox
Copy link
Contributor

redox commented Oct 28, 2015

Oh good catch :/

redox added a commit that referenced this pull request Oct 28, 2015
chore(warnings): Remove test warning about `type should not be null`
@redox redox merged commit c7c8fa1 into develop Oct 28, 2015
@redox redox deleted the fix/test-react-warning-createlement branch October 28, 2015 10:00
@redox redox removed the in progress label Oct 28, 2015
@@ -27,7 +27,7 @@ describe('autoHideContainer', () => {
});

function render(props = {}) {
var AutoHide = autoHideContainer(<span />);
var AutoHide = autoHideContainer('span');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what we are testing here, the signature of autoHideContainer is:

function autoHideContainer(ComposedComponent) {

and the render:

return <ComposedComponent {...this.props} />;

So yes we fixed the warnings but we have another issue I feel here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. I'll update with a TestComponent() {render() {}} instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants