Repository navigation
pr_runtime: run mocha with --reporter spec, not --verbose - #189
Open
RizgarOzan wants to merge 1 commit into
Open
RizgarOzan wants to merge 1 commit into
RizgarOzan wants to merge 1 commit into
Conversation
mocha has no --verbose option. Mocha 10 and 11 read the next word as its value, so once targeting appends the PR's test files the first one is swallowed: `npx mocha --verbose test/a.spec.js test/b.spec.js` only runs b.spec.js, and with a single file mocha falls back to ./test. I switched mocha to --reporter spec, which is its default reporter anyway and takes a value, so the files after it stay positional. A --verbose the bootstrap saved is dropped too, and an explicit --reporter / -R is left alone. Closes huggingface#188
4 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--reporter specinstead of--verbose. mocha has no--verboseflag, so mocha 10 and 11 read the next word as its value, and targeting appends the PR's test files right after it:npx mocha --verbose test/a.spec.js test/b.spec.jsonly runsb.spec.js.--verbosealready in the saved command is dropped, and an explicit--reporter/-Ris left alone. Jest still gets--verbose.Test plan
tests/test_pipeline_pr_runtime.py: the normalize cases (npx mocha,mocha --verbose --silent,-R dot,--reporter=tap), and normalize followed by targeting with two files. Both fail on main and pass here. The oldnpx mocha --verboseassertion is replaced.uv run ruff check .,uv run ruff format --check ., the docs generator--checks.test_pipeline_pr_runtime,test_log_parsers*,test_mocha_output,test_jest_output,test_pr_runtime_verifier,test_grading,test_pipeline_commit_runtime,test_pipeline_cve_patchesand the cargo/pytest parser files): 436 passed.pytest -qon Windows: the same 250 failures and 81 errors as on clean main (asset mode0o666and symlink privilege on this machine), the failing ids are identical; the only difference is the 2 new passing tests. I couldn't run the Linux job locally.Out of scope
npm testcommands that call mocha throughpackage.jsondon't containmocha, so they still get no reporter flag; I didn't touch that path.Closes #188