(props, ref)
| 200 | |
| 201 | it('should use the inner name in the stack', async () => { |
| 202 | const fn = (props, ref) => { |
| 203 | return [<span />]; |
| 204 | }; |
| 205 | Object.defineProperty(fn, 'name', {value: 'Inner'}); |
| 206 | const RefForwardingComponent = React.forwardRef(fn); |
| 207 | ReactNoop.render( |
| 208 | <p> |
| 209 | <RefForwardingComponent /> |
| 210 | </p>, |
| 211 | ); |
| 212 | await waitForAll([]); |
| 213 | assertConsoleErrorDev([ |
| 214 | 'Each child in a list should have a unique "key" prop.' + |
| 215 | '\n\nCheck the top-level render call using <ForwardRef(Inner)>. It was passed a child from ForwardRef(Inner). ' + |
| 216 | 'See https://react.dev/link/warning-keys for more information.\n' + |
| 217 | ' in span (at **)\n' + |
| 218 | ' in Inner (at **)', |
| 219 | ]); |
| 220 | }); |
| 221 | |
| 222 | it('can use the outer displayName in the stack', async () => { |
| 223 | const RefForwardingComponent = React.forwardRef((props, ref) => { |
no test coverage detected