The library for web and native user interfaces.
Remove textContent tests; they break in phantomjs
Ben Alpert committed
Jun 19, 2013 at 17:26 UTC
ac5320e8871e87a01d22a69e2d9dc1ab7f781515
1 file changed
+1
-18
src/core/__tests__/ReactDOMTextarea-test.js
+1
-18
@@ -19,8 +19,6 @@
19
20
"use strict";
21
22
-var mocks = require('mocks');
23
-
22
describe('ReactDOMTextarea', function() {
23
var React;
24
var ReactTestUtils;
@@ -29,25 +27,12 @@ describe('ReactDOMTextarea', function() {
27
beforeEach(function() {
28
React = require('React');
29
ReactTestUtils = require('ReactTestUtils');
32
- getTextContentAccessor = require('getTextContentAccessor');
30
});
31
35
- it("should update value and not update textContent", function() {
36
- var textContentAccessor = getTextContentAccessor();
32
+ it("should update value", function() {
33
var stub = ReactTestUtils.renderIntoDocument(<textarea>giraffe</textarea>);
34
var node = stub.getDOMNode();
35
40
- var nodeText = node[textContentAccessor];
41
- var nodeTextSetter = mocks.getMockFunction();
42
- Object.defineProperty(node, textContentAccessor, {
43
- get: function() {
44
- return nodeText;
45
- },
46
- set: nodeTextSetter.mockImplementation(function(newText) {
47
- nodeText = newText;
48
- })
49
- });
50
-
36
expect(node.value).toEqual('giraffe');
37
38
stub.replaceProps({ children: 'gorilla' });
@@ -64,8 +49,6 @@ describe('ReactDOMTextarea', function() {
49
50
stub.replaceProps({ content: 'eggplant' });
51
expect(node.value).toEqual('eggplant');
67
-
68
- expect(nodeTextSetter.mock.calls.length).toBe(0);
52
});
53
54
it("should throw with multiple or invalid children", function() {