Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(functions-test): Fix mockHttpEvent for null bodies #10570

Merged
merged 3 commits into from
May 15, 2024

Conversation

Tobbe
Copy link
Member

@Tobbe Tobbe commented May 14, 2024

With an empty/null payload (which it is by default) the body should be empty, not the string 'null'

This is a breaking change for anyone who was depending on the current "null" behavior in their api function tests. More specifically, if you're NOT passing body or payload to mockHttpEvent({ ... }) or if you're trying to explicitly set payload to null you might have to update your tests.

@Tobbe Tobbe added release:breaking This PR is a breaking change release:fix This PR is a fix and removed release:fix This PR is a fix labels May 14, 2024
@Tobbe Tobbe added this to the next-release-major milestone May 14, 2024
@Tobbe Tobbe requested a review from dac09 May 14, 2024 11:49
Copy link
Contributor

@dac09 dac09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dac09 dac09 enabled auto-merge (squash) May 15, 2024 12:01
@dac09 dac09 merged commit 42ce69a into redwoodjs:main May 15, 2024
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:breaking This PR is a breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants