diff --git a/curriculum/challenges/english/03-front-end-libraries/react/pass-an-array-as-props.english.md b/curriculum/challenges/english/03-front-end-libraries/react/pass-an-array-as-props.english.md index 27f783065d..79fc1bc713 100644 --- a/curriculum/challenges/english/03-front-end-libraries/react/pass-an-array-as-props.english.md +++ b/curriculum/challenges/english/03-front-end-libraries/react/pass-an-array-as-props.english.md @@ -47,7 +47,14 @@ tests: - text: The second List component representing the tasks for tomorrow should have 3 or more items. testString: assert((function() { const mockedComponent = Enzyme.mount(React.createElement(ToDo)); return mockedComponent.find('List').get(1).props.tasks.length >= 3; })()); - text: The List component should render the value from the tasks prop in the p tag. - testString: assert((function() { const mockedComponent = Enzyme.mount(React.createElement(ToDo)); return mockedComponent.find('p').get(0).props.children === mockedComponent.find('List').get(0).props.tasks.join(', ') && mockedComponent.find('p').get(1).props.children === mockedComponent.find('List').get(1).props.tasks.join(', '); })()); + testString: | + assert((function() { + const mockedComponent = Enzyme.mount(React.createElement(ToDo)); + return ( + mockedComponent.find('p').get(0).props.children.replace(/\s*,\s*/g,',') === mockedComponent.find('List').get(0).props.tasks.join(',').replace(/\s*,\s*/g,',') && + mockedComponent.find('p').get(1).props.children.replace(/\s*,\s*/g,',') === mockedComponent.find('List').get(1).props.tasks.join(',').replace(/\s*,\s*/g,',') + ); + })()); ```