diff --git a/src/component/base/__tests__/DraftEditor.react-test.js b/src/component/base/__tests__/DraftEditor.react-test.js
index 10fb433597..267cffa88f 100644
--- a/src/component/base/__tests__/DraftEditor.react-test.js
+++ b/src/component/base/__tests__/DraftEditor.react-test.js
@@ -34,8 +34,15 @@ describe('DraftEditor.react', () => {
shallow.render(
,
);
-
- var key = shallow._instance._instance.getEditorKey();
+
+ // internally at Facebook we use a newer version of the shallowRenderer
+ // which has a different level of wrapping of the '_instance'
+ // long term we should rewrite this test to not depend on private
+ // properties
+ var getEditorKey =
+ shallow._instance.getEditorKey
+ || shallow._instance._instance.getEditorKey;
+ var key = getEditorKey();
expect(typeof key).toBe('string');
expect(key.length).toBeGreaterThanOrEqual(4);
});
@@ -44,8 +51,15 @@ describe('DraftEditor.react', () => {
shallow.render(
,
);
-
- var key = shallow._instance._instance.getEditorKey();
+
+ // internally at Facebook we use a newer version of the shallowRenderer
+ // which has a different level of wrapping of the '_instance'
+ // long term we should rewrite this test to not depend on private
+ // properties
+ var getEditorKey =
+ shallow._instance.getEditorKey
+ || shallow._instance._instance.getEditorKey;
+ var key = getEditorKey();
expect(key).toBe('hash');
});
});