-
Notifications
You must be signed in to change notification settings - Fork 1.4k
add script to test docs for warnings/errors #6763
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
Conversation
|
If you use something like puppeteer-cluster you should be able to parallelize. docs-differ crawls the site using this, but I didn't find much benefit to parallelization, probably because taking the screenshot was too intensive to gain much benefit from multiple threads. |
|
@ktabors Yeah, was going to look into it to potentially speed it up a bit, but probably not needed since this doesn't need to be run too often. |
snowystinger
left a comment
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.
Nice, not nearly as many issues as I thought there'd be. Question, should the process finish when the errors are collected and done? It appears to stay active.
| }); | ||
| } | ||
|
|
||
| async function getPageLinks() { |
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.
Is there a reason you're scanning the raw files instead of the pages from the server for URLs? Less links to look at because you're not having to deal with the sidebar or header navigation? We talked about having the list of links from the start being an intentional optimization.
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.
Yeah, it seemed a little more organized and you can see the progress as it's running.
| if (server && server.process) { | ||
| server.process.kill(); | ||
| } | ||
| process.exit(0); |
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.
Thank you!!!
|
## API Changes
unknown top level export { type: 'any' } |
This scripts loads every docs page in a browser and logs any runtime warnings/errors on page load.
✅ Pull Request Checklist:
📝 Test Instructions:
yarn test:docsOptionally specify the browser as an argument (i.e.
yarn test:docs webkit), supportchromium(default),webkit, andfirefox.🧢 Your Project: