Add trailing slash to manual tests link#2241
Merged
alexpetros merged 1 commit intobigskysoftware:devfrom Jan 24, 2024
Merged
Conversation
alexpetros
approved these changes
Jan 24, 2024
Collaborator
alexpetros
left a comment
There was a problem hiding this comment.
Yup, I know exactly what you're talking about and this fixes it—thank you! If there were a way to specify this config with an environment variable we could put in the package.json and that would be fine, but you're right that we don't want to add another config.
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.
Description
When trying to contribute, docs suggest to use
npx serveand then go to http://0.0.0.0:3000/test/ to see all tests, in this file there's a link to the manual tests, but if you have followed the steps on the guide you will realize that the links for the individual manual tests are not working, all files will throw a 404, the first time I saw this I didn't know if I had something misconfigured, then I realized that the links were relative and since the link to "manual" didn't have a trailing slash, all individual manual tests were pointed to the root of tests folder (i.e.http://localhost:3000/test/aborting-requestinstead ofhttp://localhost:3000/test/manual/aborting-request)The "correct" way to fix this would be to add a
serve.jsonas stated here: vercel/serve#628, but not sure about adding a new config file and also, on my first test that approach worked for the test files links but broke relative image paths so I would need to review all tests and fix all affected. (not to mention that we need to make sure that paths works when open the files "locally" withoutnpx serve)Instead, I'm submitting this PR which only adds a trailing slash to the manual tests link on
http://0.0.0.0:3000/test/this way a newcomer would not get immediately confused when trying to run and explore tests.I've made sure that this approach also works when opening the files "locally".
Screenshot of the issue:

Corresponding issue:
Testing
NA
Checklist
masterfor website changes,devforsource changes)
approved via an issue
npm run test) and verified that it succeeded