(tree, children, scale = 'medium')
| 222 | }; |
| 223 | |
| 224 | let rerender = (tree, children, scale = 'medium') => { |
| 225 | let newTree = tree.rerender( |
| 226 | <Provider theme={theme} scale={scale}> |
| 227 | {children} |
| 228 | </Provider> |
| 229 | ); |
| 230 | act(() => { |
| 231 | jest.runAllTimers(); |
| 232 | }); |
| 233 | return newTree; |
| 234 | }; |
| 235 | // I'd use tree.getByRole(role, {name: text}) here, but it's unbearably slow. |
| 236 | let getCell = (tree, text) => { |
| 237 | // Find by text, then go up to the element with the cell role. |