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
But this is undesirable, because I have to obfuscate my code to get around the testing tool.
Desired change
Option 1: hyperlink should only follow a fetch() URL if it knows for sure that it's a GET request (although I think this is going down a deep rabbithole)
Fetch had always been difficult to reason about for assetgraph. There's are cases where it's used to fetch internal static assets, which would make sense to check, and in assetgraphs other user cases to include in the build. But this case is obviously wrong behavior, and hyperlink also shouldn't attempt other http methods either.
I'm inclined to say that hyperlink should maybe just assume fetch is not used for static content by default, and not check the link at all.
It maybe it should only follow fetch requests if the URL had a known static file extension.
Steps to reproduce
Expected behavior
All tests pass, because no requests made by this page will result in a 404.
Actual behavior
It seems that when
hyperlink
findsfetch("somestringliteral", { ... })
, it will try toGET somestringliteral
, and fail if it gets a 404.Workaround
I can currently outsmart
hyperlink
by writingBut this is undesirable, because I have to obfuscate my code to get around the testing tool.
Desired change
hyperlink
should only follow afetch()
URL if it knows for sure that it's a GET request (although I think this is going down a deep rabbithole)The text was updated successfully, but these errors were encountered: