Skip to content

Commit 14cd15e

Browse files
Miguel Jimenez Esunfacebook-github-bot
authored andcommitted
Enforce component name
Summary: When snapshotting, do not get affected by the building process. Reviewed By: rafeca Differential Revision: D8638527 fbshipit-source-id: 8335fc55c0c85f2ff110db338a5000c7af4b29aa
1 parent fb2ec1e commit 14cd15e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

jest/mockComponent.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ module.exports = (moduleName, instanceMethods) => {
1717
typeof RealComponent === 'function' ? RealComponent : React.Component;
1818

1919
const Component = class extends SuperClass {
20+
static displayName = 'Component';
21+
2022
render() {
2123
const name =
2224
RealComponent.displayName ||

0 commit comments

Comments
 (0)