HIDE PLAYLIST

30% off

1 Year Pro Membership

React Testing: className with Shallow Rendering


The React Shallow Renderer test utility lets us inspect the output of a component one level deep. In this lesson, we will examine the rendered output of props, specifically the className prop. We will then use the ES2015 String.includes() method to check that our rendered className includes what we expect.

Please take a moment to tell your friends:

You must be a PRO Member to view code