-
Notifications
You must be signed in to change notification settings - Fork 14
fix: fix request body type when optional #48
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great tests, thank you! Left a minor comment on making the written tests a bit more clear in purpose and reducing boilerplate (at first glance it’s not clear what these tests are testing because they copy code from other tests). But not blocking. Will merge either way eventually.
Hi, |
|
||
// expect error on wrong body type | ||
// @ts-expect-error | ||
await client.post('/post/optional', { body: { error: true } }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Awesome! These types of inverse tests are very helpful (sometimes even more helpful than the “assert no error” tests.
Thanks again! Happy to merge as-is; the lint issue is minor and I can fix after merge. |
Changes
requestBody
fetch()
options to make it reusable for other HTTP clientsChecklist