Skip to content

Commit

Permalink
fix(pretty-format): correctly detect memo
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Nov 17, 2019
1 parent ac3f2a5 commit 899cc86
Show file tree
Hide file tree
Showing 4 changed files with 257 additions and 217 deletions.
2 changes: 1 addition & 1 deletion packages/jest-fake-timers/package.json
Expand Up @@ -17,7 +17,7 @@
"lolex": "^5.0.0"
},
"devDependencies": {
"@types/lolex": "^3.1.1"
"@types/lolex": "^5.1.0"
},
"engines": {
"node": ">= 8"
Expand Down
2 changes: 1 addition & 1 deletion packages/pretty-format/package.json
Expand Up @@ -16,7 +16,7 @@
"@jest/types": "^24.9.0",
"ansi-regex": "^5.0.0",
"ansi-styles": "^4.0.0",
"react-is": "^16.8.4"
"react-is": "^16.12.0"
},
"devDependencies": {
"@types/react": "*",
Expand Down
2 changes: 1 addition & 1 deletion packages/pretty-format/src/plugins/ReactElement.ts
Expand Up @@ -60,7 +60,7 @@ const getType = (element: any) => {
: 'ForwardRef';
}

if (ReactIs.isMemo(type)) {
if (ReactIs.isMemo(element)) {
const functionName =
type.displayName || type.type.displayName || type.type.name || '';

Expand Down

0 comments on commit 899cc86

Please sign in to comment.