# `MutagenEx.TestModuleDiscovery`
[🔗](https://github.com/iautom8things/mutagen_ex/blob/v0.2.0/lib/mutagen_ex/test_module_discovery.ex#L1)

Finds loaded ExUnit cases in the cited test files.

ExUnit consumes the registered case list on each run. Coverage, baseline,
and mutation use this list to register the same cases again without
compiling the files again.

# `entry`

```elixir
@type entry() :: {module(), module_cfg()}
```

A case and its registration options.

# `module_cfg`

```elixir
@type module_cfg() :: %{async?: boolean(), group: term(), parameterize: [map()] | nil}
```

ExUnit case configuration with serial execution.

# `discover`

```elixir
@spec discover([Path.t()]) :: [entry()] | {:error, :test_file_load_failed, map()}
```

Return loaded modules whose compile source is a cited path and that
export `__ex_unit__/0`. Call after requiring the files. Entries follow
the caller's file order, then compilation order within each file.
Cases without a source declaration follow in module name order.
A cited symlink to a case compiled under a different path returns
`{:error, :test_file_load_failed, details}`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
