()
| 2242 | const spy = jest.fn(); |
| 2243 | |
| 2244 | const AnotherComponent = () => <div>old</div>; |
| 2245 | |
| 2246 | class App extends React.Component { |
| 2247 | static getDerivedStateFromProps({ n }) { |
| 2248 | return { n }; |
| 2249 | } |
| 2250 | |
| 2251 | render() { |
| 2252 | return ( |
| 2253 | <div> |
| 2254 | hey {this.state.n} <AnotherComponent /> |
| 2255 | </div> |
| 2256 | ); |
| 2257 | } |
| 2258 | } |
| 2259 | |
| 2260 | // Can't always run polyfill, as running polyfill in React 16 will make |
| 2261 | // this test case pass even without the fix. |
nothing calls this directly
no outgoing calls
no test coverage detected