-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat: add doNotUseFetch helper to the test utils #5789
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
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.
Interesting PR, I think I'd just rename the path to /http
instead of /global
, as it'd be easier to discover in the future.
Now that I think of, maybe it'd be better to use a linter rule that directs you to the utils package |
Do you mean one that does that when someone tries to overwrite |
I found it helpful during the draft implementation of #5774.
The idea is to override the global reference to fetch with a function that always throws an error. This is a very crude approach to simulating network connectivity issues when using fetch. We can explore this area further in the future if needed. However, at this time, this met my needs.