Skip to content

Commit 71a8a5a

Browse files
committed
fix unit test
1 parent 7c5e367 commit 71a8a5a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

__tests__/ToggleDisplay-test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ describe('ToggleDisplay', function() {
7373
);
7474

7575
var tdShowRoot = TestUtils.findRenderedDOMComponentWithTag(tdShow, 'span');
76-
//react returns a <noscript> if null is returned, so we check for that
77-
var tdHideRoot = TestUtils.findRenderedDOMComponentWithTag(tdHide, 'noscript');
76+
//react returns a <noscript> if null is returned but that behavior doesn't seem to be testable
77+
//instead, check for the <p>. It shouldn't be there and an empty array should be returned
78+
expect( TestUtils.scryRenderedDOMComponentsWithTag(tdHide, 'p') ).toEqual([]);
7879

7980
expect(tdShow.props.if).toEqual(true);
8081
expect(tdHide.props.if).toEqual(false);

0 commit comments

Comments
 (0)