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!
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the dev-dependencies group with 2 updates: ash_json_api and mimic.
Updates
ash_json_api
from 1.4.6 to 1.4.7Changelog
Sourced from ash_json_api's changelog.
Commits
84a496d
chore: release version v1.4.7c7f3f5c
fix: decode path parameters automaticallya14347e
chore(deps): bump json_xema in the production-dependencies group (#226)fa46e44
chore: make some functions public for a special secret projectUpdates
mimic
from 1.9.0 to 1.10.0Release notes
Sourced from mimic's releases.
Commits
cabca76
Update ham6845ed8
Add experimental support to type check stubs and expectationsff62baa
Use Macro.generate_arguments/2feff9d8
Include .formatter.exs in published filesDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show