(updates: any[])
| 33 | ) |
| 34 | |
| 35 | const expectUpdates = (updates: any[]) => { |
| 36 | onProps.mock.calls.forEach((args, i) => { |
| 37 | const update = updates[i] |
| 38 | if (update) { |
| 39 | expect(args[0]).toMatchObject(update) |
| 40 | } else { |
| 41 | // Unexpected update. |
| 42 | expect(args[0]).toBeUndefined() |
| 43 | } |
| 44 | }) |
| 45 | onProps.mockClear() |
| 46 | } |
| 47 | |
| 48 | const elem = await render(getRoot()) |
| 49 | // React.StrictMode runs the layout effect twice on initial mount |
no test coverage detected
searching dependent graphs…