Runtime checks for Elixir, OTP, and Livebook compatibility.
Runs before notebook discovery to fail fast with actionable messages
when the environment cannot support livebook_test.
Supported versions
| Component | Requirement |
|---|---|
| Elixir | ~> 1.18 (1.18.0 and later) |
| OTP | 26, 27, or 28 |
| Livebook | ~> 0.19.0 with live_markdown_to_elixir/1 |
Livebook is a transitive dependency of livebook_test. If :livebook
fails to compile in your project, see the troubleshooting section in the README.
Summary
Functions
Runs all preflight checks.
Runs preflight checks and raises on failure.
Returns the formatted preflight error message for display.
Types
@type result() :: :ok | {:error, String.t()}
Preflight check result
Functions
@spec check() :: result()
Runs all preflight checks.
Returns :ok when the environment is supported, or {:error, message}
with a human-readable explanation.
Examples
iex> LivebookTest.Preflight.check() == :ok
true
@spec check!() :: :ok
Runs preflight checks and raises on failure.
Suitable for Mix tasks where a raised error is the desired outcome.
@spec check_livebook() :: result()
@spec check_otp(non_neg_integer()) :: result()
Returns the formatted preflight error message for display.