-
Notifications
You must be signed in to change notification settings - Fork 30k
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
test: amplify and optimize doctool/test-make-doc #19581
test: amplify and optimize doctool/test-make-doc #19581
Conversation
One ARM fail seems doc unrelated. |
test/doctool/test-make-doc.js
Outdated
assert.ok( | ||
fs.statSync(path.join(apiPath, actualDoc)).size !== 0, | ||
`${actualDoc} is empty` | ||
); |
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.
This could actually be combined with the upper loop. That way the loop has to run only once instead of twice.
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.
Done.
The same ARM fail seems doc unrelated again. |
ARM-fanned re-run: https://ci.nodejs.org/job/node-test-commit-arm-fanned/15425/ |
ARM-fanned all green. |
PR-URL: #19581 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Landed in b5884fb |
PR-URL: #19581 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesCurrently, the
doctool/test-make-doc.js
has 2 tiny performance nits and 2 logic oversights.Performance nits
Logic oversights.
Makefile
generates docs by getting theconsole.log()
output from thetools/doc/generate.js
and redirecting it to the doc files. Iftools/doc/generate.js
throws, an empty doc file is still created. So we can have a situation when the last.md
source has an error and all the needed files are nevertheless present, just one of them is empty. So we need to check if all the files are not empty.Refactoring strategy
The test is changed considerably, but it may be more strict, full and performant in this form.