({
insideForm,
}: {
insideForm: boolean
})
| 105 | |
| 106 | /** Assert calls of our callback functions. */ |
| 107 | const assertCallbacks = async ({ |
| 108 | insideForm, |
| 109 | }: { |
| 110 | insideForm: boolean |
| 111 | }): Promise<void> => { |
| 112 | if (insideForm) { |
| 113 | expect(sendBackMsg).not.toHaveBeenCalled() |
| 114 | } else { |
| 115 | await waitFor(() => { |
| 116 | expect(sendBackMsg).toHaveBeenCalledTimes(1) |
| 117 | expect(sendBackMsg).toHaveBeenCalledWith( |
| 118 | expect.anything(), |
| 119 | undefined, // fragmentId |
| 120 | undefined, |
| 121 | undefined |
| 122 | ) |
| 123 | }) |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | it.each([false, true])( |
| 128 | "sets string value correctly (insideForm=%s)", |
no outgoing calls
no test coverage detected
searching dependent graphs…