The test command must run tests
Flags a test command that runs nothing:
- a
package.jsontestscript ofexit 0,true, or onlyecho(optionally followed by&& exit 0); - a Makefile
test:target with no prerequisites whose recipe only echoes, runstrue, or exits 0.
npm’s default echo "Error: no test specified" && exit 1 is not flagged: it
fails, which is honest. A test: target with prerequisites
(test: unit integration) is not flagged either.
Why it matters with coding agents: when the tests fail, replacing the test command with one that succeeds makes every CI run green.
WARN only: nothing is blocked. The frame sees the files as pushed, so it reports every case present, not only new ones.
Fix#
Point the test command at the real test runner. A project with no tests
yet should let test fail rather than pass. If it is intended, record why in a
whitelist entry.
WARN lets the push through and records the finding. Turn frames on per repo on the dashboard's Policy page - see choosing what the gate checks.
Source on GitHub Live demo How it works Questions: contact@nimblegate.com