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>
pull/39689/head
Walter Palagi 2020-09-25 08:11:05 +02:00 committed by GitHub
parent 104a8068e3
commit 3d7af80047
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ tests:
testString: assert((function() { const mockedComponent = Enzyme.mount(React.createElement(ShoppingCart)); return mockedComponent.find('ShoppingCart').length === 1; })());
- text: The <code>Items</code> component should render.
testString: assert((function() { const mockedComponent = Enzyme.mount(React.createElement(ShoppingCart)); return mockedComponent.find('Items').length === 1; })());
- text: The <code>Items</code> component should include a <code>propTypes</code> check that requires <code>quantity</code> to be a <code>number</code>.
- text: The <code>Items</code> component should include a <code>propTypes</code> check to require a value for <code>quantity</code> 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='); })());
```