Skip to content

fix(test): skip cache-tests when submodule is missing - #5661

Open
edenbuilds wants to merge 2 commits into
nodejs:mainfrom
edenbuilds:fix/citgm-cache-tests-fixture
Open

fix(test): skip cache-tests when submodule is missing#5661
edenbuilds wants to merge 2 commits into
nodejs:mainfrom
edenbuilds:fix/citgm-cache-tests-fixture

Conversation

@edenbuilds

Copy link
Copy Markdown

Summary

  • npm test runs test:cache-tests, which imports test/fixtures/cache-tests/.../runner.mjs.
  • That path is a git submodule. CITGM (and plain npm-pack installs) do not check it out, so the suite fails with Cannot find module '.../runner.mjs' (Test failure on CITGM for Node.js 26.6.0 #5642).
  • Skip cleanly with a warning when the runner is absent — same idea as the WPT runner’s missing-checkout handling.

Fixes #5642

Test plan

  • With empty test/fixtures/cache-tests (no submodule): node test/cache-interceptor/cache-tests.mjs --ci exits 0 and prints the skip warning
  • With submodule initialized: cache-tests still run as before

Made with Cursor

CITGM installs the published package without git submodules, so
test/fixtures/cache-tests is empty and importing the runner fails the
suite. Exit cleanly with a warning when the checkout is absent
(fixes nodejs#5642).
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.45%. Comparing base (dd85997) to head (a6ce851).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5661      +/-   ##
==========================================
+ Coverage   93.43%   93.45%   +0.02%     
==========================================
  Files         110      110              
  Lines       38733    38776      +43     
==========================================
+ Hits        36190    36239      +49     
+ Misses       2543     2537       -6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

@edenbuilds

Copy link
Copy Markdown
Author

CI note: the Node 24/26 failures are in test/http2-request-never-settles.js (unrelated to this one-line cache-tests submodule guard). Re-running the failed jobs.

Previous run failed only on test/http2-request-never-settles.js; this
change is unrelated to the cache-tests submodule skip.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test failure on CITGM for Node.js 26.6.0

2 participants