docs: corrected example code of fetch API mocking in test runner.#7492
Merged
AugustinMauroy merged 1 commit intonodejs:mainfrom Feb 17, 2025
Merged
docs: corrected example code of fetch API mocking in test runner.#7492AugustinMauroy merged 1 commit intonodejs:mainfrom
AugustinMauroy merged 1 commit intonodejs:mainfrom
Conversation
docs: corrected example code of fetch API mocking. Signed-off-by: Mohammed Bilal Shareef <bilalshareef.h@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
aymen94
approved these changes
Feb 13, 2025
benhalverson
added a commit
to benhalverson/nodejs.org
that referenced
this pull request
Feb 16, 2025
5 tasks
Contributor
|
Lighthouse Results
|
Contributor
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 24, 2025
* feat: added new learn section with fetch examples #7492 * updated code example and added to sidebar * docs: updated example code * docs: Updated example to use mistral and typo fix * docs: spelling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current example code throws
TypeError [Error]: Invalid URL at new URL (node:internal/url:816:29)error when ran.The correct usage for
MockAgent.get()API of undici is to pass the base URL with the protocol(https, http, etc).Description
Validation
Related Issues
Check List
npm run formatto ensure the code follows the style guide.npm run testto check if all tests are passing.npx turbo buildto check if the website builds without errors.