Skip to content

test: credit validate.js coverage and close remaining gaps - #122

Merged
2wenty2wo merged 3 commits into
mainfrom
test/coverage-round-2
Nov 30, 2026
Merged

2wenty2wo merged 3 commits into
mainfrom
test/coverage-round-2

Conversation

@2wenty2wo

@2wenty2wo 2wenty2wo commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

Builds on #121, merge that first.

Summary

  • validate.js (called out): optional VALIDATE_ROOT env override + readEntries(path.join(root, 'data')) so catalog.test.js runs the real scripts/validate.js against the fixture. No duplicate tests; c8 now attributes error-path coverage to scripts/validate.js instead of a temp copy.
  • Extend watch, check-star-list, and discover tests for missed branches/CLI dry-run paths (fetch stubbed; no network).
  • The optional WATCH_ROOT override lets the real watch CLI read a temporary catalog and verify that dry-run leaves its state file byte-identical.

Coverage (Codecov #121 head → local after)

File Before After (local c8 lines)
scripts/validate.js 60.2% 100%
scripts/check-star-list.js 87.1% 94.3%
scripts/watch.js 90.9% 93.0%
scripts/discover.js 93.9% 96.2%

Total local lines: 94.17%.

Skipped lines

  • watch.js: live issue open/comment paths and non-dry runWatch CLI catch (need real issue API beyond existing stubs).
  • check-star-list.js: default runGh exec, missing-repo draft loop inside main, non-dry syncIssue path.
  • discover.js: searchCandidates item loop + 2.2s delay, fork release probing, dry-run excluded-interesting rows, non-dry GITHUB_REPOSITORY required path, CLI main().catch.

Bugs found: none.

Test plan

  • npm run coverage passes locally
  • CI green; Codecov ≥90% on each of the four files

🤖 Generated with Claude Code

Made with Cursor

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-30T23:12:38.432977Z 05b10b1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codecov

codecov Bot commented Nov 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 05b10b1a17

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/watch.test.js Resolved
@2wenty2wo
2wenty2wo force-pushed the test/coverage-round-2 branch from 05b10b1 to 939707b Compare November 30, 2026 23:21
@2wenty2wo
2wenty2wo merged commit 6d02b95 into main Nov 30, 2026
2 checks passed
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.

1 participant