···11# Changelog
2233+## v1.5.1 - 2025-06-11
44+55+- Fixed a bug where Erlang modules in subdirectories within `test` could cause
66+ the test runner to fail.
77+38## v1.5.0 - 2025-06-11
49510- Improved the format for unexpected errors on JavaScript.
+1-1
gleam.toml
···11name = "gleeunit"
22-version = "1.5.0"
22+version = "1.5.1"
33licences = ["Apache-2.0"]
44description = "A simple test runner for Gleam, using EUnit on Erlang"
55repository = { type = "github", user = "lpil", repo = "gleeunit" }
+14-4
src/gleeunit.gleam
···11import gleam/list
22+import gleam/result
23import gleam/string
3445/// Find and run all test functions for the current project using Erlang's EUnit
···3435fn halt(a: Int) -> Nil
35363637fn gleam_to_erlang_module_name(path: String) -> String {
3737- path
3838- |> string.replace(".gleam", "")
3939- |> string.replace(".erl", "")
4040- |> string.replace("/", "@")
3838+ case string.ends_with(path, ".gleam") {
3939+ True ->
4040+ path
4141+ |> string.replace(".gleam", "")
4242+ |> string.replace("/", "@")
4343+4444+ False ->
4545+ path
4646+ |> string.split("/")
4747+ |> list.last
4848+ |> result.unwrap(path)
4949+ |> string.replace(".erl", "")
5050+ }
4151}
42524353@external(erlang, "gleeunit_ffi", "find_files")