diff --git a/src/renderers/shared/shared/__tests__/ReactStatelessComponent-test.js b/src/renderers/shared/shared/__tests__/ReactStatelessComponent-test.js
index caea83e35e..a095ee0ca4 100644
--- a/src/renderers/shared/shared/__tests__/ReactStatelessComponent-test.js
+++ b/src/renderers/shared/shared/__tests__/ReactStatelessComponent-test.js
@@ -15,6 +15,8 @@ var React;
var ReactDOM;
var ReactTestUtils;
+var ReactDOMFeatureFlags = require('ReactDOMFeatureFlags');
+
function StatelessComponent(props) {
return
{props.name}
;
}
@@ -123,17 +125,20 @@ describe('ReactStatelessComponent', () => {
);
});
- it('should throw when stateless component returns array', () => {
- function NotAComponent() {
- return [, ];
- }
- expect(function() {
- ReactTestUtils.renderIntoDocument(
);
- }).toThrowError(
- 'NotAComponent(...): A valid React element (or null) must be returned. ' +
- 'You may have returned undefined, an array or some other invalid object.'
- );
- });
+ if (!ReactDOMFeatureFlags.useFiber) {
+ // Stack doesn't support fragments
+ it('should throw when stateless component returns array', () => {
+ function NotAComponent() {
+ return [, ];
+ }
+ expect(function() {
+ ReactTestUtils.renderIntoDocument(
);
+ }).toThrowError(
+ 'NotAComponent(...): A valid React element (or null) must be returned. ' +
+ 'You may have returned undefined, an array or some other invalid object.'
+ );
+ });
+ }
it('should throw when stateless component returns undefined', () => {
function NotAComponent() {