Skip to content

Feature Request: Support per-process mocking #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jtrees opened this issue Jul 23, 2021 · 3 comments
Open

Feature Request: Support per-process mocking #129

jtrees opened this issue Jul 23, 2021 · 3 comments

Comments

@jtrees
Copy link

jtrees commented Jul 23, 2021

It would be cool if it was possible to use mock with async: true in tests. Mox supports this.

@Olshansk
Copy link
Collaborator

Interesting... I'm curious what feature(s) this library has that Mox doesn't that is still keeping you with library?

@jtrees
Copy link
Author

jtrees commented Jul 25, 2021

I don't want to be forced to add behaviours just to mock something.

@ffloyd
Copy link

ffloyd commented Jan 28, 2022

+1

Mox requires you to add behaviors and substitute modules globally in the test scope. While it can be true from an idealistic perspective, on the practice:

  • it leads to dynamic resolution of modules. This is bad for dialyzer and autocompletion.
  • it makes code more complex, especially for simple services that are dealing with multiple remote resources.
  • I may want to have tests that are calling to real external API, just exclude them from CI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants