MutagenEx.Test.ExUnitServerFacade behaviour (mutagen_ex v0.2.0)

Copy Markdown View Source

Behaviour for the ExUnit.Server test seam used by MutagenEx.MutationRunner.MutationLoop.

Per-mutation test cycles re-register cited test modules with ExUnit.Server before each ExUnit.run/0, because the server consumes its registered-module list per run. The facade exists so tests can swap a fake module recording the calls.

Default

MutagenEx.Test.ExUnitServer delegates to ExUnit.Server.

Summary

Callbacks

Add a test module to the ExUnit server's registered list. Mirrors ExUnit.Server.add_module/2.

Empty pending registrations without running tests.

Callbacks

add_module(module, cfg)

@callback add_module(module :: module(), cfg :: map()) :: any()

Add a test module to the ExUnit server's registered list. Mirrors ExUnit.Server.add_module/2.

The cfg map matches the shape ExUnit's server expects, validated against Elixir 1.19.5 / OTP 28 in the S2 spike: %{async?: false, group: nil, parameterize: nil}

discard_pending_modules()

@callback discard_pending_modules() :: :ok

Empty pending registrations without running tests.