Add trailing slash to manual tests link #2241
Merged
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 serve
and 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-request
instead ofhttp://localhost:3000/test/manual/aborting-request
)The "correct" way to fix this would be to add a
serve.json
as 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
master
for website changes,dev
forsource changes)
approved via an issue
npm run test
) and verified that it succeeded