TE

Elm Testing

Testing conventions for Elm using elm-test

Elm
Testing
Default

Details

Language / Topic
elmElm
Category
Testing

Rules

balanced
- Use `elm-test` with `Test.describe` and `Test.test` to structure test suites and `Expect.equal` for assertions.
- Place tests in a `tests/` directory as separate Elm files — import production modules directly without any test-specific wrappers.
- Use `Fuzz.int`, `Fuzz.string`, and custom fuzzers with `Test.fuzz` for property-based testing of pure functions.
- Test `update` functions by passing a `Msg` and asserting on the returned `Model` and `Cmd` — use `Test.Extra` helpers if available.