| 205 | |
| 206 | test("calling `run` with a callback as argument allows to override fetch parameters", () => { |
| 207 | const override = params => ({ ...params, resource: "/bar", body: '{"name":"bar"}' }) |
| 208 | const component = ( |
| 209 | <Fetch input="/foo" init={{ method: "POST", body: '{"name":"foo"}' }}> |
| 210 | {({ run }) => <button onClick={() => run(override)}>run</button>} |