Penlight — Run tests. Illuminate coverage.
A Gleam test and benchmark runner for Erlang/OTP and JavaScript on Node.js, with native Gleam assertions, optional line coverage, an interactive terminal explorer, HTML reports, and historical benchmark comparisons.
-
Dual runtime: supports both Erlang/OTP and JavaScript (Node.js) targets, including
--comparemode. -
Line coverage & reports: optional OTP
cover/ V8 profiler integration with self-contained HTML reports (--coverage --html). - Benchmarks: historical benchmark comparisons alongside unit tests.
Installation
Install the published release from Hex:
gleam add --dev penlight
Then in test/<package_name>_test.gleam:
import gleam/string
import penlight
pub fn main() { penlight.main() }
pub fn greeting_test() {
assert string.contains("Hello, Gleam!", "Gleam")
}