dashbitco/mox
Mocks and explicit contracts in Elixir observed · 2026-08-28
Health v2 · maintenance only
77/100
- Activity 99
- Release rhythm 35
- Longevity 100
Flags: no_releases no_license
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 3264
- days_rel: n/a
- days_push: 8
- n_releases_24m: 0
Adoption not part of the score
1401 stars · 78 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
Mox is an Elixir library for defining concurrent mocks based on explicit behaviours (contracts). It enforces strict mocking principles so tests can run with async: true while stubbing behaviour implementations.
Use cases
- mock external API calls in Elixir tests
- define mocks based on behaviours instead of ad-hoc modules
- keep Elixir tests concurrent with async: true while mocking
- assert on function inputs using pattern matching instead of expectation rules
- enforce explicit contracts between application components
- swap real implementations with test doubles in test_helper.exs
When to choose
- you write Elixir applications and want reliable, concurrency-safe mocks
- you prefer behaviour-driven design with explicit contracts between modules
- you need mocks that support parallel test execution
- you want to avoid dynamically generated mock modules in tests
When to avoid
- you need ad-hoc or per-test dynamic mocking without defining behaviours
- you are not working in the Elixir/Erlang ecosystem
- you prefer expectation-based mocking libraries with complex verification rules
Facets
library · maturity stable
testing mocking testing developer-tools elixir jvm elixir behaviour-based-mocks concurrent-tests explicit-contracts
1 source
- readme: https://github.com/dashbitco/mox · fetched 2026-08-28 · db27a261b19a
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| dashbitco/mox | main | 77 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem