Use innerHTML not innerText in test
Ben Alpert committed
Dec 25, 2013 at 22:47 UTC
633125fd0d219311da20d1429186e8b4ba8c77ce
1 file changed
+3
-3
src/core/__tests__/ReactMount-test.js
+3
-3
@@ -54,19 +54,19 @@ describe('ReactMount', function() {
54
expect(mockUnmount.mock.calls.length).toBe(0);
55
56
ReactMount.renderComponent(<Component text="orange" key="A" />, container);
57
- expect(container.firstChild.innerText).toBe('orange');
57
+ expect(container.firstChild.innerHTML).toBe('orange');
58
expect(mockMount.mock.calls.length).toBe(1);
59
expect(mockUnmount.mock.calls.length).toBe(0);
60
61
// If we change the key, the component is unmounted and remounted
62
ReactMount.renderComponent(<Component text="green" key="B" />, container);
63
- expect(container.firstChild.innerText).toBe('green');
63
+ expect(container.firstChild.innerHTML).toBe('green');
64
expect(mockMount.mock.calls.length).toBe(2);
65
expect(mockUnmount.mock.calls.length).toBe(1);
66
67
// But if we don't change the key, the component instance is reused
68
ReactMount.renderComponent(<Component text="blue" key="B" />, container);
69
- expect(container.firstChild.innerText).toBe('blue');
69
+ expect(container.firstChild.innerHTML).toBe('blue');
70
expect(mockMount.mock.calls.length).toBe(2);
71
expect(mockUnmount.mock.calls.length).toBe(1);
72
});