Skip to content

fix: honor Mocha only exclusivity in test harness - #305

Merged
pmatos merged 3 commits into
mainfrom
sym/jsse/293-node-test-harness-honor-mocha-only-exclusivity-in-describe-only-it-only
Jul 20, 2026
Merged

fix: honor Mocha only exclusivity in test harness#305
pmatos merged 3 commits into
mainfrom
sym/jsse/293-node-test-harness-honor-mocha-only-exclusivity-in-describe-only-it-only

Conversation

@pmatos

@pmatos pmatos commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • track exclusive tests and suites while preserving definition order
  • filter the registered tree before execution with Mocha direct-test precedence, nested focus, and skip interactions
  • add end-to-end harness fixtures whose selected totals were cross-checked against Mocha 11.7.6

Validation

  • cargo fmt --check
  • cargo clippy
  • cargo build --release
  • cargo test --release (294 unit tests plus smoke oracle)
  • ./scripts/lint.sh
  • ./scripts/run-harness-selftest.sh --no-build
  • uv run python scripts/run-custom-tests.py (7/7)
  • Node syntax checks for the harness and new fixtures
  • full test262: 99,546 / 99,568; the exact 22 Intl402 failures are the pre-existing locale-data drift documented in merged PR test: add AJV validation corpus harness #280, and this branch has no engine, dependency, test262 baseline, or README diff from origin/main

Closes #293

@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: ab6f52191f

ℹ️ 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/node-test-harness.js
@claude

claude Bot commented Jul 17, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

Replacing the `it.only = it` alias with a bare exclusive registrar dropped
the `.each` helper the alias had carried, so `test.only.each(table)(...)`
(global `test` aliases `it`) threw `TypeError: test.only.each is not a
function` at registration before exclusivity could apply.

Factor the array-table registrar into `eachRegistrar(register)` and attach
`it.only.each = eachRegistrar(it.only)` so each generated row registers as a
focused test, honoring `.only` exclusivity instead of merely avoiding the
crash. Add tap-only-each.fixture.js, which asserts the semantics (ordinary
siblings are dropped; only the two rows run) so a naive no-throw restore that
registered non-exclusive rows would still fail it.
@pmatos
pmatos merged commit e986748 into main Jul 20, 2026
8 checks passed
@pmatos
pmatos deleted the sym/jsse/293-node-test-harness-honor-mocha-only-exclusivity-in-describe-only-it-only branch July 20, 2026 06:28
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

node-test-harness: honor Mocha .only exclusivity in describe.only/it.only

1 participant