Skip to content

fix request body unusable in update mode#2851

Merged
mikicho merged 3 commits intomainfrom
Michael/fix-2841
Mar 27, 2025
Merged

fix request body unusable in update mode#2851
mikicho merged 3 commits intomainfrom
Michael/fix-2841

Conversation

@mikicho
Copy link
Copy Markdown
Contributor

@mikicho mikicho commented Mar 27, 2025

closes #2841

@mikicho mikicho requested review from Uzlopak and gr2m March 27, 2025 16:41
@mikicho mikicho enabled auto-merge (squash) March 27, 2025 16:44
Copy link
Copy Markdown
Member

@gr2m gr2m left a comment

Choose a reason for hiding this comment

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

I confirmed that the test is failing without the fix.

No biggi, but something I find very helpful for reviewers is to push the test first as a commit to show that it's failing, and then push the commits that implement the fix or feature to show that the new tests are now passing


beforeEach(() => {
// random fixture file so tests don't interfere with each other
const token = crypto.randomBytes(4).toString('hex')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

instead of random bytes, can we use a global counter that gets incremented for each test?

@mikicho mikicho merged commit eff7318 into main Mar 27, 2025
14 checks passed
@mikicho mikicho deleted the Michael/fix-2841 branch March 27, 2025 16:47
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 14.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nock.back fails with TypeError: unusable when using fetch POST with a body and NOCK_BACK_MODE=update

2 participants