unexpected-react icon indicating copy to clipboard operation
unexpected-react copied to clipboard

White space in text nodes should be treated like in HTML

Open salomvary opened this issue 5 years ago • 0 comments

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>

salomvary avatar Oct 14 '20 10:10 salomvary