You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to write tests for a route I've created. However I cannot for the life of me figure out how to set the request.body on createMockContext. The request.body is readonly so clearly it's not intended to be mutated like so:
This discussion was converted from issue #632 on January 31, 2024 01:51.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to write tests for a route I've created. However I cannot for the life of me figure out how to set the
request.body
oncreateMockContext
. Therequest.body
is readonly so clearly it's not intended to be mutated like so:I've tried so search the codebase but can't see any examples or interfaces for creating a mocked JSON request context.
Beta Was this translation helpful? Give feedback.
All reactions