This change improves the messaging when a component is passed as a selector. I also noticed the "were" / "was" selection was off for toContainMatchingElements, so I fixed that in this PR as well.
Expected <SongList> to contain 3 elements matching function Song(_ref) {
var id = _ref.id,
title = _ref.title,
lyrics = _ref.lyrics;
return _get__('React').createElement(
'dl',
{ id: 'song-' + id },
title && _get__('React').createElement(
'dt',
{ className: 'title' },
title
),
lyrics && _get__('React').createElement(
'dd',
{ className: 'lyrics' },
lyrics
)
);
} but 1 were found.
HTML Output of <SongList>:
<SongList><Song title="I\'m a Little Teapot" lyrics="I\'m a Little Teapot, short and stout." /></SongList>
Output with this change
Expected <SongList> to contain 3 elements matching "Song" but 1 was found.
HTML Output of <SongList>:
<SongList><Song title="I\'m a Little Teapot" lyrics="I\'m a Little Teapot, short and stout." /></SongList>
This change improves the messaging when a component is passed as a selector. I also noticed the "were" / "was" selection was off for
toContainMatchingElements
, so I fixed that in this PR as well.Using this test:
Output before this change:
Output with this change