()
| 127 | ); |
| 128 | }; |
| 129 | const MyComponent = () => { |
| 130 | const [storeKey, setStoreKey] = React.useState('list1'); |
| 131 | return ( |
| 132 | <StoreContextProvider value={memoryStore({})}> |
| 133 | <StoreConsumer storeKey={storeKey} /> |
| 134 | <button onClick={() => setStoreKey('list2')}> |
| 135 | change key |
| 136 | </button> |
| 137 | </StoreContextProvider> |
| 138 | ); |
| 139 | }; |
| 140 | render(<MyComponent />); |
| 141 | expect(screen.queryByText('hello')).toBeNull(); |
| 142 | fireEvent.click(screen.getByText('change value')); |
nothing calls this directly
no test coverage detected