Releases: edgurgel/mimic
Releases · edgurgel/mimic
Mimic 1.11.0
Mimic 1.10.2
What's Changed
- enable calling Mimic.allow when not using expectations by @michaelst in #82
New Contributors
- @michaelst made their first contribution in #82
Full Changelog: v1.10.1...v1.10.2
Mimic 1.10.1
Mimic 1.10.0
What's Changed
- Include .formatter.exs in published files by @bjyoungblood in #78
- Experimental: Type checking for stubs and expectations by @edgurgel in #77
New Contributors
- @bjyoungblood made their first contribution in #78
Full Changelog: v1.9.0...v1.10.0
Experimental type checking for copied modules
One can pass type_check: true
when a module is copied to also get the function expected/stubbed to
validate the arguments and return value using Ham which is essentially
what Hammox improved on Mox.
Mimic.copy(:cowboy_req, type_check: true)
If there is any problem with the arguments or return values of the stubbed functions on your tests you might see
an error like this one:
** (Mimic.TypeCheckError) :cowboy_req.parse_qs/1: 1st argument value %{} does not match 1st parameter's type :cowboy_req.req().
Could not find a map entry matching required(:method) => binary().
This feature is experimental at the moment which means that it might change a little bit how this
is configured and used. Feedback is welcome!
Mimic 1.9.0
What's Changed
- Show correct error when module has not yet been loaded by @brain-geek in #72
- Change direct :erlang calls to Elixir function calls by @brain-geek in #75
- Fix typos by @brain-geek in #73
- Add functionality to call the original function by @brain-geek in #74
New Contributors
- @brain-geek made their first contribution in #72
Full Changelog: v1.8.2...v1.9.0
Mimic 1.8.2
Fix cover error when JIT is enabled. Issue #70
Full Changelog: v1.8.1...v1.8.2
Mimic 1.8.1
- Fix Mimic copying for erlang modules
Mimic 1.8.0
What's Changed
- Standardise :module_already_copied error tuple by @cassiomarques in #48
- Fix stub with undefined by @edgurgel in #56
- Update README with @jimsynz's correct github handle by @joshprice in #57
- Fix typo in documentation examples by @sevenseacat in #59
- Upgrade to latest ExDoc by @davydog187 in #62
- Add information about intra-module functions to README by @regan-karlewicz in #68
- Update gh actions by @edgurgel in #69
- Copy structs when they exist by @harrisi in #67
- Bump elixir requirement to ~> 1.16
New Contributors
- @cassiomarques made their first contribution in #48
- @joshprice made their first contribution in #57
- @sevenseacat made their first contribution in #59
- @davydog187 made their first contribution in #62
- @regan-karlewicz made their first contribution in #68
- @harrisi made their first contribution in #67
Full Changelog: v1.7.4...v1.8.0
Mimic 1.7.4
What's Changed
- fix: Copy fails with umbrella mix test stale (make Mimic.copy idempotent) by @dylan-chong in #47
Full Changelog: v1.7.3...v1.7.4
Mimic 1.7.3
What's Changed
- Update README.md by @pmargreff in #42
- Lazy Load Cover private function hack by @dylan-chong in #45
- Minor refactor and comments by @dylan-chong in #46
New Contributors
- @pmargreff made their first contribution in #42
Full Changelog: v1.7.2...v1.7.3