Modkit.Mount (modkit v0.9.1)

Copy Markdown View Source

Summary

Functions

as_test(mount)

define(raw_points, opts \\ [])

define!(points, opts \\ [])

do_resolve(list, mod_split)

path_as_test(path)

Transforms a module file path (without extension) into the corresponding test file path (also without extension).

The transformation replaces a leading lib/ or test/ segment with test/, or prepends test/ otherwise, then appends _test to the last segment.

iex> Modkit.Mount.path_as_test("lib/my_app/foo")
"test/my_app/foo_test"

iex> Modkit.Mount.path_as_test("dev/my_app/foo")
"test/dev/my_app/foo_test"

iex> Modkit.Mount.path_as_test("test/support/my_app/foo")
"test/support/my_app/foo_test"

preferred_path(mount, module)

prefix_of?(map, mod_split)

resolve(mount, mod_split)