Skip to content

Commit 9fee13d

Browse files
committed
wrote a test case
1 parent f97380d commit 9fee13d

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

tests/components/component.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export default class TestComponent extends Component {
2323
onClick={this.props.onClick}>
2424
Click Me
2525
</button>
26+
<input name="bob" />
2627
<TinyComponent test="true"/>
2728
<OtherComponent test="true"/>
2829
</section>

tests/find.jsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ describe('Find middleware', () => {
3838

3939
})
4040

41+
it('should find an input with a name attribute that equals \'bob\'', ()=>{
42+
Test(<TestComponent/>)
43+
.find('input[name="bob"]')
44+
.test(function(){
45+
expect(this.elements['[input[name="bob"]']).to.not.equal(undefined)
46+
})
47+
})
48+
4149
it('should find a rendered component', () => {
4250
Test(<TestComponent/>)
4351
.find(TinyComponent)

0 commit comments

Comments
 (0)