Skip to main content

Module run_tests

Module run_tests 

Source
Expand description

pre-push-run-tests-js — run each touched JS package’s gate before pushing.

git feeds pre-push one line per ref on stdin. That list is parsed ONCE by the dispatcher (see pushrefs) and lent here, because stdin can only be consumed once and more than one check needs it: An all-zero local oid is a deletion; an all-zero remote oid means the branch is new, so everything it carries is in range.

Constants§

JS_EXTS
The extensions this check treats as “JS worth testing”. Exported so registry.rs declares the scope from the same constant — see lint_json_yaml::EXTS for the drift this prevents.

Functions§

defines_script
Does package.json define script under “scripts”?
gate_for
The GATE, minus what a pre-commit declaration already covers.
package_dirs
Tracked package.json paths, as directories relative to the repo root.
packages_to_test
Packages that actually contain one of the changed files.
run