# `Juggernaut.TestLanes`
[🔗](https://github.com/holsee/juggernaut/blob/v0.4.0/lib/juggernaut/test_lanes.ex#L1)

The test lanes of a project (`test_lanes` in `.juggernaut.exs`, design notes §10.6):
which of its tests are integration tests, and the timeouts each lane is held to.

A test is an integration test when it has one of `test_lanes.integration.tags` set
(to anything but `false` or `nil`, as `@tag`, `@describetag` or `@moduletag` set it),
or its file matches one of `test_lanes.integration.paths`; every other test is a unit
test. The default is the tag `:integration` and the directory `test/integration/`.

A mutant runs its unit tests first and its integration tests only when they all pass
(`Juggernaut.Runner.Schedule.stages/3`): a mutant that only an integration test kills
is still killed, and is reported apart (`test_lane: :integration` in its result), since
no unit test would have caught it.

Each lane has its own timeout (E3): the unit lane the top-level `timeout`, the
integration lane `test_lanes.integration.timeout`, whose keys default to the top-level
ones.

# `lane`

```elixir
@type lane() :: :unit | :integration
```

# `test_id`

```elixir
@type test_id() :: {module(), atom()}
```

# `test_info`

```elixir
@type test_info() :: %{:file =&gt; String.t(), optional(:tags) =&gt; [atom()]}
```

# `integration`

```elixir
@spec integration(%{required(test_id()) =&gt; test_info()}, Juggernaut.Config.t()) ::
  MapSet.t(test_id())
```

The integration tests of `tests` (the boot inventory, `%{test_id => test_info}`, each
with its `file` and the `tags` it has set), as a set.

# `integration?`

```elixir
@spec integration?(test_info(), keyword()) :: boolean()
```

Whether a test (`file` and set `tags`) is an integration test under `spec`.

# `timeout`

```elixir
@spec timeout(Juggernaut.Config.t(), lane()) :: [
  multiplier: number(),
  min_ms: pos_integer()
]
```

The timeout config (`[multiplier:, min_ms:]`) of `lane`: the top-level `timeout`, with
`test_lanes.integration.timeout` over it for the integration lane.

---

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