(props, ref)
| 502 | |
| 503 | it('should use the inner name in the stack', async () => { |
| 504 | const fn = (props, ref) => { |
| 505 | return [<span />]; |
| 506 | }; |
| 507 | Object.defineProperty(fn, 'name', {value: 'Inner'}); |
| 508 | const MemoComponent = React.memo(fn); |
| 509 | ReactNoop.render( |
| 510 | <p> |
| 511 | <MemoComponent /> |
| 512 | </p>, |
| 513 | ); |
| 514 | await waitForAll([]); |
| 515 | assertConsoleErrorDev([ |
| 516 | 'Each child in a list should have a unique "key" prop.' + |
| 517 | '\n\nCheck the top-level render call using <Inner>. It was passed a child from Inner. ' + |
| 518 | 'See https://react.dev/link/warning-keys for more information.\n' + |
| 519 | ' in span (at **)\n' + |
| 520 | ' in Inner (at **)', |
| 521 | ]); |
| 522 | }); |
| 523 | |
| 524 | it('can use the outer displayName in the stack', async () => { |
| 525 | const MemoComponent = React.memo((props, ref) => { |
no test coverage detected