GitHoox.Hooks.Test (GitHoox v0.4.0)

Copy Markdown View Source

Runs mix test.

Options

  • :scope:all, :stale, or :related. Default :all.

Defaults

  • stage_fixed: false
  • files: ~w(**/*.ex **/*.exs)
  • scope: :all

When scope: :related is selected and related_test_files/1 produces an empty list (no lib/foo.ex → test/foo_test.exs mappings exist on disk), the hook returns :ok without invoking mix test. Falling through to a bare mix test would silently run the entire suite, which is the opposite of what the caller asked for.