diff --git a/src/core/__tests__/ReactMultiChildText-test.js b/src/core/__tests__/ReactMultiChildText-test.js index 6457a902d2..7cdce88b7a 100644 --- a/src/core/__tests__/ReactMultiChildText-test.js +++ b/src/core/__tests__/ReactMultiChildText-test.js @@ -70,7 +70,7 @@ var expectChildren = function(d, children) { if (typeof child === 'string') { reactComponentExpect(d) .expectRenderedChildAt(i) - .toBeTextComponent(); + .toBeTextComponentWithValue(child); textNode = d.getDOMNode().childNodes[i].firstChild; diff --git a/src/test/__tests__/reactComponentExpect-test.js b/src/test/__tests__/reactComponentExpect-test.js new file mode 100644 index 0000000000..b29d73cf70 --- /dev/null +++ b/src/test/__tests__/reactComponentExpect-test.js @@ -0,0 +1,49 @@ +/** + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @emails react-core + */ + +"use strict"; + +var React; +var ReactTestUtils; +var reactComponentExpect; + +var mocks; +var warn; + +describe('reactComponentExpect', function() { + + beforeEach(function() { + React = require('React'); + ReactTestUtils = require('ReactTestUtils'); + reactComponentExpect = require('reactComponentExpect'); + }); + + it('should detect text components', function() { + var SomeComponent = React.createClass({ + render: function() { + return ( +