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
parent
104a8068e3
commit
3d7af80047
|
@ -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='); })());
|
||||
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue