fix : Unclear test output use-array.map-to-dynamically-render-… (#38191)

This commit is contained in:
kundan kumar
2020-02-13 02:41:36 +05:30
committed by GitHub
parent 2f951f0dff
commit 971c62ab53

View File

@ -28,6 +28,8 @@ tests:
testString: assert((function() { const mockedComponent = Enzyme.mount(React.createElement(MyToDoList)); return mockedComponent.find('MyToDoList').length === 1; })());
- text: The first child of <code>MyToDoList</code> should be a <code>textarea</code> element.
testString: assert((function() { const mockedComponent = Enzyme.mount(React.createElement(MyToDoList)); return mockedComponent.find('MyToDoList').children().childAt(0).type() === 'textarea'; })());
- text: The second child of <code>MyToDoList</code> should be a <code>br</code> element.
testString: assert((function() { const mockedComponent = Enzyme.mount(React.createElement(MyToDoList)); return mockedComponent.find('MyToDoList').children().childAt(1).type() === 'br'; })());
- text: The third child of <code>MyToDoList</code> should be a <code>button</code> element.
testString: assert((function() { const mockedComponent = Enzyme.mount(React.createElement(MyToDoList)); return mockedComponent.find('MyToDoList').children().childAt(2).type() === 'button'; })());
- text: The state of <code>MyToDoList</code> should be initialized with <code>toDoList</code> as an empty array.
@ -80,7 +82,8 @@ class MyToDoList extends React.Component {
onChange={this.handleChange}
value={this.state.userInput}
style={textAreaStyles}
placeholder="Separate Items With Commas" /><br />
placeholder="Separate Items With Commas" />
<br />
<button onClick={this.handleSubmit}>Create List</button>
<h1>My "To Do" List:</h1>
<ul>
@ -94,7 +97,6 @@ class MyToDoList extends React.Component {
</div>
### After Test
<div id='jsx-teardown'>