()
| 306 | it('resets to defaultValue when submitting form action', async () => { |
| 307 | const Component = component; |
| 308 | function Test() { |
| 309 | const [value, formAction] = React.useActionState( |
| 310 | (_, formData) => formData.get('value'), |
| 311 | 'initial' |
| 312 | ); |
| 313 | |
| 314 | return ( |
| 315 | <form action={formAction}> |
| 316 | <TextField defaultValue={value} name="value"> |
| 317 | <Label>Value</Label> |
| 318 | <Component data-testid="input" /> |
| 319 | </TextField> |
| 320 | <input data-testid="submit" type="submit" /> |
| 321 | </form> |
| 322 | ); |
| 323 | } |
| 324 | |
| 325 | const {getByTestId} = render(<Test />); |
| 326 | const input = getByTestId('input'); |
nothing calls this directly
no outgoing calls
no test coverage detected