-
Notifications
You must be signed in to change notification settings - Fork 36
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
Question: arguments pattern matching. #50
Comments
Yup you should see a function clause error I think. |
Ok, it doesn't for me, but the counter expectation still verifies correctly. |
Do you have a full test case file to share so we can replicate it? Cause testing quickly with mimic tests it seems to work as intended:
|
This is the test
This is the implementation
This test is green independently from the arguments. Changing the number of calls fails as expected. |
Sorry I mean a minimal reproducible code that we can see failing. It's hard to understand what is going on here, how is the test helper setup to copy mimic etc etc |
Ok, I was able to get the test failing removing the Oban job and running the execution synchronously.
|
I see. Your issue might be related to async execution from a different process https://github.com/edgurgel/mimic#private-and-global-mode . You can either make it global or |
Ok, I'll look into that and I'll report back. |
So I did make the expectation global with |
Is the Mimic expected behavior to fail an expectation if the original implementation gets called with different arguments than the one defined in the
expect
function?Is the above supposed to fail verification?
The text was updated successfully, but these errors were encountered: