diff --git a/src/test/ReactTestUtils.js b/src/test/ReactTestUtils.js index 746a185b1ae4d..d454b9150daa2 100644 --- a/src/test/ReactTestUtils.js +++ b/src/test/ReactTestUtils.js @@ -410,9 +410,11 @@ NoopInternalComponent.prototype = { var ShallowComponentWrapper = function(element) { // TODO: Consolidate with instantiateReactComponent - this._debugID = nextDebugID++; - var displayName = element.type.displayName || element.type.name || 'Unknown'; - ReactInstrumentation.debugTool.onSetDisplayName(this._debugID, displayName); + if (__DEV__) { + this._debugID = nextDebugID++; + var displayName = element.type.displayName || element.type.name || 'Unknown'; + ReactInstrumentation.debugTool.onSetDisplayName(this._debugID, displayName); + } this.construct(element); };