Skip to content

test: check html and json doc files are generated - #66613

Open
richardlau wants to merge 2 commits into
nodejs:mainfrom
richardlau:doccheck
Open

richardlau wants to merge 2 commits into
nodejs:mainfrom
richardlau:doccheck

Conversation

@richardlau

Copy link
Copy Markdown
Member

Refs: #66571


In theory this should cause

- name: Test
run: NODE=$(command -v node) make test-doc-ci TEST_CI_ARGS="-p actions --measure-flakiness 9"
to fail as we only reverted the new doc design on v26.x and not on main.

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to Node.js documentation. needs-ci PRs that need a full CI run. test Issues and PRs related to Node.js core tests and test infrastructure. tools Issues and PRs related to the tools directory. labels Oct 8, 2026
@richardlau richardlau added the wip Issues and PRs that are still a work in progress. label Oct 8, 2026
@richardlau

Copy link
Copy Markdown
Member Author

In theory this should cause

- name: Test
run: NODE=$(command -v node) make test-doc-ci TEST_CI_ARGS="-p actions --measure-flakiness 9"

to fail as we only reverted the new doc design on v26.x and not on main.

https://github.com/nodejs/node/actions/runs/37830084207/job/113492860307?pr=66613#step:6:7

python3 tools/test.py --shell '/opt/hostedtoolcache/node/24.21.0/x64/bin/node' -p actions --measure-flakiness 9  doctool
Running 3 tests
.. failed 10 out of 10
F
=== release test-docs ===
Path: doctool/test-docs
Error: --- stderr ---
node:internal/modules/run_main:107
    triggerUncaughtException(
    ^

AssertionError [ERR_ASSERTION]: esm.html was not generated (checked addons.json,addons.md,all.json,assert.json,assert.md,async_context.json,async_context.md,async_hooks.json,async_hooks.md,bench.json,bench.md,buffer.json,buffer.md,child_process.json,child_process.md,cli.json,cli.md,cluster.json,cluster.md,console.json,console.md,crypto.json,crypto.md,debugger.json,debugger.md,deprecations.json,deprecations.md,dgram.json,dgram.md,diagnostics_channel.json,diagnostics_channel.md,dns.json,dns.md,documentation.json,documentation.md,domain.json,domain.md,dtls.json,dtls.md,embedding.json,embedding.md,environment_variables.json,environment_variables.md,errors.json,errors.md,esm.json,esm.md,events.json,events.md,ffi.json,ffi.md,fs.json,fs.md,globals.json,globals.md,http.json,http.md,http2.json,http2.md,https.json,https.md,index.json,index.md,inspector.json,inspector.md,intl.json,intl.md,module.json,module.md,modules.json,modules.md,n-api.json,n-api.md,net.json,net.md,os.json,os.md,packages.json,packages.md,path.json,path.md,perf_hooks.json,perf_hooks.md,permissions.json,permissions.md,process.json,process.md,punycode.json,punycode.md,querystring.json,querystring.md,quic.md,readline.json,readline.md,repl.json,repl.md,report.json,report.md,single-executable-applications.json,single-executable-applications.md,sqlite.json,sqlite.md,stream.json,stream.md,stream_iter.json,stream_iter.md,string_decoder.json,string_decoder.md,test.json,test.md,timers.json,timers.md,tls.json,tls.md,tracing.json,tracing.md,tty.json,tty.md,typescript.json,typescript.md,url.json,url.md,util.json,util.md,v8.json,v8.md,vfs.json,vfs.md,vm.json,vm.md,wasi.json,wasi.md,webcrypto.json,webcrypto.md,webstreams.json,webstreams.md,worker_threads.json,worker_threads.md,zlib.json,zlib.md)
    at file:///home/runner/work/node/node/test/doctool/test-docs.mjs:47:5
    at process.processTicksAndRejections (node:internal/process/task_queues:104:5) {
  generatedMessage: false,
  code: 'ERR_ASSERTION',
  actual: false,
  expected: true,
  operator: '==',
  diff: 'simple'
}

Node.js v24.21.0
Command: /opt/hostedtoolcache/node/24.21.0/x64/bin/node /home/runner/work/node/node/test/doctool/test-docs.mjs

===
=== 1 tests failed
===

Failed tests:
/opt/hostedtoolcache/node/24.21.0/x64/bin/node /home/runner/work/node/node/test/doctool/test-docs.mjs
make: *** [Makefile:739: test-doc-ci] Error 1

So this does successfully detect that we're not generating the HTML files on main.
Obviously we can't land this PR with the test failing like that (or nobody will be able to land PRs), so we'd either need to revert the redesign or fix the generation on main before adding this test. cc @nodejs/doc-kit

@richardlau richardlau mentioned this pull request Oct 8, 2026
@richardlau richardlau removed the wip Issues and PRs that are still a work in progress. label Oct 8, 2026
Signed-off-by: Richard Lau <richard.lau@ibm.com>
@codecov

codecov Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.43%. Comparing base (f9defa6) to head (d386035).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #66613   +/-   ##
=======================================
  Coverage   90.43%   90.43%           
=======================================
  Files         791      791           
  Lines      276563   276585   +22     
  Branches    53115    53116    +1     
=======================================
+ Hits       250117   250137   +20     
- Misses      16850    16857    +7     
+ Partials     9596     9591    -5     

see 30 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Richard Lau <richard.lau@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to Node.js documentation. needs-ci PRs that need a full CI run. test Issues and PRs related to Node.js core tests and test infrastructure. tools Issues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants