Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,38 @@

Notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/). This project mirrors the Elm version. So version 0.19.2-revisionX of this project will be compatible with Elm 0.19.2.
The format is based on [Keep a Changelog](http://keepachangelog.com/). This project mirrors the Elm version. So version 0.19.2-X of this project will be compatible with Elm 0.19.2. See [Versions](./README.md#versions) for details.

## 0.19.2-0 - 2026-07-06

### Breaking

elm-test now requires [Elm 0.19.2](https://github.com/elm/compiler/releases/tag/0.19.2)!

Note that if you install Elm 0.19.2, but forget to update elm-test, you’ll get an error like this:

```
-- ELM VERSION MISMATCH ----------------------------------------------- elm.json

Your elm.json says this application needs a different version of Elm.

It requires 0.19.1, but you are using 0.19.2 right now.


`elm make` failed with exit code 1.
```

That error message is slightly confusing because it’s talking about a generated `elm.json` file deep in the `elm-stuff/` directory, not your own elm.json! But either way, the solution is to use the same version of `elm` and `elm-test`. See [Versions](./README.md#versions) for details.

Thanks to [Harm](https://github.com/hahschaa) for helping with this!

## Performance

- elm-test no longer depends on the `chalk` package. [Jeroen Engels](https://github.com/jfmengels) noticed that all we used that package for was to color text blue and red, and made a PR simplifying that to just two functions (and a helper), instead of a whole package – with sub-dependencies. This removed 6 npm packages in total, and about 0.2 MB, from an elm-test install!

- elm-test now starts up to ~40 ms faster in some cases, due to lazy loading of two npm packages. When not using the watch mode, or when not using the junit report, we now avoid loading a bunch of file watching and XML generating code. Thanks to [Jeroen Engels](https://github.com/jfmengels) for doing deep analysis on this!

- When `Expect.equal` fails on two large, dissimilar strings, the reporter's character-level diff takes several seconds – just to realize that a diff cannot be displayed. [Matthieu Pizenberg](https://github.com/mpizenberg/) fixed this in [elm-test-rs](https://github.com/mpizenberg/elm-test-rs), which originally copied the code in question from this repo. The fix has now been copied back, so diffs stay sub-second, even for really large cases!

## 0.19.1-revision17 - 2025-11-18

Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,28 @@ When people say “elm-test” they usually refer to either:

## Versions

Not all versions of [elm-explorations/test] and this CLI tool work together!
You need to keep the versions of these three things in sync:

- This CLI tool.
- The Elm compiler.
- The [elm-explorations/test] package.

When it comes to the first two it’s easy: Use the same version for both. If you use Elm 0.19.2, use version 0.19.2 of this CLI tool as well. Note that the npm packages for both `elm` and `elm-test` might have suffixes such as `-0` and `-1` etc. It’s totally OK to use `elm@0.19.2-0` with `elm-test@0.19.2-1`! The suffixes don’t need to match. The suffixes are all about bug fixes or features in the respective npm packages, while the base version says which compiler version we’re working with.

When it comes to [elm-explorations/test]: Use at least version 2.0.0 with elm-test 0.19.2. If you’re on 0.19.1, see the following table:

| elm-explorations/test | elm-test CLI |
| --------------------- | -------------------- |
| >= 2.0.0 | >= 0.19.1-revision10 |
| <= 1.2.2 | <= 0.19.1-revision9 |

(For 0.19.1, the suffix used was for example `-revision9` instead of just `-9`. This was changed in 0.19.2 to match the `elm` npm package.)

> **Unfortunate behavior of 0.19.1-revision9 and older**
>
> - `elm-test init` always installs the latest [elm-explorations/test]. This means that if you run `elm-test init` on version 0.19.1-revision9 or older, you will get elm-explorations/test 2.0.0 or later, which don’t work 100 % together (see the next point).
> - elm-test 0.19.1-revision9 or older do _not_ validate that [elm-explorations/test] in your elm.json has a compatible version. If you upgrade to elm-explorations/test 2.0.0 or later but forget to upgrade the elm-test CLI, most things will still work, but test distribution diagrams (new in elm-explorations/test 2.0.0) won’t show up. So if you use `Test.fuzzWith` and wonder why distribution diagrams never show up – check your elm-test CLI version!
> - There exists an elm-test CLI version called just "0.19.1". It should have been called "0.19.1-revision1", but unfortunately isn’t. Don’t make the mistake thinking it’s the latest version! You always want "0.19.1-revisionX".
> - There exists an elm-test CLI version called just "0.19.1". It should have been called "0.19.1-revision1", but unfortunately isn’t. Don’t make the mistake thinking it’s the latest version! You always want "0.19.1-revisionX". (This is also why there is a version called "0.19.2-0" but no "0.19.2".)

## Installation

Expand Down
2 changes: 1 addition & 1 deletion lib/Generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function getMainModule(generatedCodeDir /*: string */) /*: {
path:
// We'll be putting the generated Main in something like this:
//
// my-project-name/elm-stuff/generated-code/elm-community/elm-test/0.19.2-revisionX/src/Test/Generated/Main.elm
// my-project-name/elm-stuff/generated-code/elm-community/elm-test/0.19.2-X/src/Test/Generated/Main.elm
path.join(getGeneratedSrcDir(generatedCodeDir), ...moduleName) + '.elm',
};
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "elm-test",
"version": "0.19.1-revision17",
"version": "0.19.2-0",
"description": "Run elm-test suites.",
"main": "elm-test.js",
"engines": {
Expand Down
Loading