Skip to content
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

Make deeply render as work with <></> at the root #64

Open
salomvary opened this issue Sep 23, 2020 · 0 comments
Open

Make deeply render as work with <></> at the root #64

salomvary opened this issue Sep 23, 2020 · 0 comments

Comments

@salomvary
Copy link

This test currently fails:

        it('renders a component with a fragment at the root', function () {

            const Fragment = function () {
                return <><div>Yay</div><div>Yeah</div></>;
            };

            expect(<Fragment/>,
                'to deeply render as', <><div>Yay</div><div>Yeah</div></>
            );
        });

with the following error:

  1) unexpected-react (deep rendering) to deeply render as renders a component with a fragment at the root:
     UnexpectedError: 
expected <Fragment />
to deeply render as <no-display-name><div>Yay</div><div>Yeah</div></no-display-name>

<Fragment // should be <no-display-name
>
  <div>Yay</div><div>Yeah</div>
</Fragment>
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

No branches or pull requests

1 participant