From 3d7af80047bac1e62e9652e8b7498659b2027a72 Mon Sep 17 00:00:00 2001 From: Walter Palagi Date: Fri, 25 Sep 2020 08:11:05 +0200 Subject: [PATCH] fix(learn): React propTypes challenge, improve test text (#39682) * In React propTypes challenge, improve test text Fixes #39204 * Remove code tags around "number" Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> --- .../use-proptypes-to-define-the-props-you-expect.english.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curriculum/challenges/english/03-front-end-libraries/react/use-proptypes-to-define-the-props-you-expect.english.md b/curriculum/challenges/english/03-front-end-libraries/react/use-proptypes-to-define-the-props-you-expect.english.md index 8e8fbba1eb..10212dccf4 100644 --- a/curriculum/challenges/english/03-front-end-libraries/react/use-proptypes-to-define-the-props-you-expect.english.md +++ b/curriculum/challenges/english/03-front-end-libraries/react/use-proptypes-to-define-the-props-you-expect.english.md @@ -31,7 +31,7 @@ tests: testString: assert((function() { const mockedComponent = Enzyme.mount(React.createElement(ShoppingCart)); return mockedComponent.find('ShoppingCart').length === 1; })()); - text: The Items component should render. testString: assert((function() { const mockedComponent = Enzyme.mount(React.createElement(ShoppingCart)); return mockedComponent.find('Items').length === 1; })()); - - text: The Items component should include a propTypes check that requires quantity to be a number. + - text: The Items component should include a propTypes check to require a value for quantity and ensure that its value is a number. testString: getUserInput => assert((function() { const noWhiteSpace = __helpers.removeWhiteSpace(getUserInput('index')); return noWhiteSpace.includes('quantity:PropTypes.number.isRequired') && noWhiteSpace.includes('Items.propTypes='); })()); ```