Quantcast
Channel: Comparing React JSX to generated HTML with Jest/Enzyme - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by Alex Ironside for Comparing React JSX to generated HTML with Jest/Enzyme

$
0
0

This

it('should match rendered description with description in MockData', () => {
  expect(wrapper.find('.description').textContent).toEqual(description.textContent);
});

it('should match rendered header with header in MockData', () => {
  expect(wrapper.find('.header').textContent).toEqual(header.textContent);
});

it('should match rendered subheader with subheader in MockData', () => {
  expect(wrapper.find('.subheader').textContent).toEqual(subheader.textContent);
});

Is the answer


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>