--- id: 5a24c314108439a4d4036165 title: Use React to Render Nested Components challengeType: 6 isRequired: false videoUrl: '' localeTitle: '' --- ## Description undefined ## Instructions undefined ## Tests
```yml tests: - text: '' testString: 'assert(Enzyme.shallow(React.createElement(TypesOfFood)).type() === "div", "The TypesOfFood component should return a single div element.");' - text: '' testString: 'assert(Enzyme.shallow(React.createElement(TypesOfFood)).props().children[1].type.name === "Fruits", "The TypesOfFood component should return the Fruits component.");' - text: '' testString: 'assert(Enzyme.mount(React.createElement(TypesOfFood)).find("h2").html() === "

Fruits:

", "The Fruits component should return the TypesOfFruit component.");' - text: '' testString: 'assert(Enzyme.mount(React.createElement(TypesOfFood)).find("ul").text() === "ApplesBlueberriesStrawberriesBananas", "The TypesOfFruit component should return the h2 and ul elements.");' ```
## Challenge Seed
```jsx const TypesOfFruit = () => { return (

Fruits:

  • Apples
  • Blueberries
  • Strawberries
  • Bananas
); }; const Fruits = () => { return (
{ /* change code below this line */ } { /* change code above this line */ }
); }; class TypesOfFood extends React.Component { constructor(props) { super(props); } render() { return (

Types of Food:

{ /* change code below this line */ } { /* change code above this line */ }
); } }; ```
### After Test
```js console.info('after the test'); ```
## Solution
```js // solution required ```