more powerful than Angular templates; they should be compared with Angular’s directives instead. [Directives are Angular's way of creating custom elements]." Pete Hunt quora.com/Pete-Hunt/Posts/Facebooks-React-vs-AngularJS-A-Closer-Look
TestUtils.findRenderedDOMComponentWithTag( checkbox, 'label'); expect( label.getDOMNode().textContent).toEqual('Off'); // Simulate a click and verify that it is now On var input = TestUtils.findRenderedDOMComponentWithTag( checkbox, 'input'); TestUtils.Simulate.change(input); expect( label.getDOMNode().textContent).toEqual('On');
TestUtils.findRenderedDOMComponentWithTag( checkbox, 'label'); expect( label.getDOMNode().textContent).toEqual('Off'); // Simulate a click and verify that it is now On var input = TestUtils.findRenderedDOMComponentWithTag( checkbox, 'input'); TestUtils.Simulate.change(input); expect( label.getDOMNode().textContent).toEqual('On');