test
Summary
Section titled “Summary”zinit-annex-test adds a test ice that automatically runs make test after a plugin is installed or updated, and a notest ice to skip testing for individual plugins when tests are enabled globally.
Details
Section titled “Details”-
Problem it solves: Verifying that a plugin passes its own test suite after installation or update requires manual intervention. This annex hooks the test run into the install/update lifecycle automatically.
-
New ices:
test— runsmake testin the plugin directory after install or updatenotest— opt-out ice; skips the test run for the specific plugin even whentestwould otherwise apply
-
Verbosity control: By default the annex runs quietly. To see test output:
Terminal window zstyle :zinit:annex:test quiet 0 -
Install:
Terminal window zinit light zdharma-continuum/zinit-annex-test
Examples
Section titled “Examples”# Run tests after installing fzf (for syntax)zinit for load make test junegunn/fzf
# Run tests after installing fzf (ice syntax)zinit ice make testzinit load junegunn/fzf
# Enable verbose test output then installzstyle :zinit:annex:test quiet 0zinit ice make testzinit load junegunn/fzf
# Skip tests for a single pluginzinit for load make notest junegunn/fzfCaveats / Common Mistakes
Section titled “Caveats / Common Mistakes”- The annex only invokes
make test; plugins without aMakefileor without atesttarget will silently produce no results (or an error ifmakeitself is missing). - The
testice is additive — combine it withmakeif the plugin also needs to be built before testing.