elm-test is the official Node.js command-line interface (CLI) for running test suites written with the `elm-explorations/test` Elm package. As of April 2026, the current stable version is `0.19.1-revision17`, with frequent patch-level releases (revisions) to address compatibility issues, bug fixes, and Node.js environment support. It functions by compiling Elm tests and executing them within a Node.js environment. A key differentiator is its tight coupling with specific versions of the `elm-explorations/test` Elm package; users must ensure compatibility between the CLI and the Elm testing library to avoid unexpected behavior, such as missing test distribution diagrams or compilation errors. It provides features like watch mode, selective test execution by file or glob, and various reporting formats.
npm install elm-testVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to programmatically install, initialize, and run `elm-test` from a Node.js script, covering basic test execution patterns.
Ensure your `elm.json` specifies `"elm-explorations/test": "2.x.x"` in your `test-dependencies` and run `elm install`.
Upgrade your Node.js environment to version 12.20.0 or higher. For current stability and features, Node.js 18+ is recommended.
Always upgrade both `elm-test` CLI and `elm-explorations/test` package together to compatible versions. Refer to the official `elm-test` GitHub README for the version compatibility table.
Always install `elm-test` with the `revision` suffix, e.g., `npm install elm-test@latest` or `npm install elm-test@0.19.1-revision17` to ensure you get the most up-to-date and stable version.
Use `npx elm-test "src/**/*Tests.elm"` instead of `npx elm-test src/**/*Tests.elm`.
For Node.js 12 environments, ensure you are using `elm-test@0.19.1-revision12` or `elm-test@0.19.1-revision15` or newer. For other versions, ensure your `npm` client is up-to-date (v10+ is recommended).
Upgrade `elm-test` to `0.19.1-revision11` or newer. This version bundles a fix for `RuntimeError: unreachable` and `0.19.1-revision16` fixed Lamdera compiler compatibility.
Upgrade `elm-test` to `0.19.1-revision12` or newer. This version escapes disallowed XML characters to prevent crashes.
Upgrade `elm-test` to `0.19.1-revision13` or newer.
No dependency data recorded yet.