diff --git a/src/addons/__tests__/ReactFragment-test.js b/src/addons/__tests__/ReactFragment-test.js
index d53e6020de..6b789e016a 100644
--- a/src/addons/__tests__/ReactFragment-test.js
+++ b/src/addons/__tests__/ReactFragment-test.js
@@ -49,13 +49,13 @@ describe('ReactFragment', function() {
z:
};
var element =
. See ' +
+ 'https://fb.me/react-warning-keys for more information.'
+ );
+ });
+
+ it('warns for keys when reusing children', function() {
+ spyOn(console, 'error');
+
+ var f =
;
+ var g =
;
+
+ var children = [f, g];
+
+ return (
+
+
+ {g}
+
+
+ {f}
+
+
+ {children}
+
+
+ );
+
+ expect(console.error.argsForCall.length).toBe(1);
+ expect(console.error.argsForCall[0][0]).toBe(
+ 'Warning: Each child in an array or iterator should have a unique ' +
+ '"key" prop. Check the React.render call using
. See ' +
+ 'https://fb.me/react-warning-keys for more information.'
+ );
+ });
+
+ it('does not warn for keys when passing children down', function() {
+ spyOn(console, 'error');
+
+ debugger;
+ var Wrapper = React.createClass({
+ render: function() {
+ return (
+
+ {this.props.children}
+
+
+ );
+ }
+ });
+
+ ReactTestUtils.renderIntoDocument(
+
+
+
+
+ );
+
+ expect(console.error.argsForCall.length).toBe(0);
+ });
+
it('warns for keys for iterables of elements in rest args', function() {
spyOn(console, 'error');
var Component = React.createFactory(ComponentClass);