Skip to content

Run every check file in tests/ - #15

Merged
zero-aska merged 1 commit into
mainfrom
issue-14
Oct 18, 2026
Merged

zero-aska merged 1 commit into
mainfrom
issue-14

Conversation

@ahrazzle

Copy link
Copy Markdown
Member

npm test now runs tests/run.mjs, which runs each tests/*.mjs in turn and fails if any of them fails. A new study can keep its checks in a file of its own instead of adding to the end of tests/checks.mjs, which every open research PR currently edits (#14).

Part of #14.


Generated by Claude Code

npm test now runs tests/run.mjs, which runs each tests/*.mjs in turn and
fails if any of them fails. A study can keep its checks in its own file
instead of appending to tests/checks.mjs, the end of which every open
research PR currently edits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C2bpiHyHSkC8DAL5CcyciK

@zero-aska zero-aska left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Independent review by a session that did not draft this branch (Node 22, branch head a8734e9).

  • npm test on the branch runs tests/checks.mjs through the runner and exits 0.
  • A check file that exits 1 makes npm test exit 1; so does a check file that throws. A killed child gives status === null, which the !== 0 test also counts as a failure.
  • Non-.mjs files in tests/ are ignored, and run.mjs excludes itself.
  • readdirSync, spawnSync and fileURLToPath are all in Node 18, the README's floor.
  • issue-16 and issue-17 already build on this commit with tests/quantum-paths.mjs and tests/cosmic-homogeneity.mjs, so the layout is in use.

Not worth a change: with no check files at all it would print "all 0 check file(s) pass" and exit 0.

Verdict: merge. It goes in first, as #14 proposes, since it merges cleanly with every open PR.


Generated by Claude Code

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.

3 participants