bruderstein / unexpected-react

Plugin for http://unexpected.js.org to enable testing the full React virtual DOM, and also the shallow renderer
http://bruderstein.github.io/unexpected-react
MIT License
186 stars 19 forks source link

White space in text nodes should be treated like in HTML #72

Open salomvary opened 4 years ago

salomvary commented 4 years ago

Expected this test to pass:

  test('html white space', () => {
    expect(
      <div>{'foo      bar'}</div>,
      'to deeply render as',
      <div>foo bar</div>
    );
  });

Got this failure instead:

    UnexpectedError: 
    expected <div>foo      bar</div> to deeply render as <div>foo bar</div>

    <div>
      foo      bar // foo      bar
                   // foo bar
    </div>