You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If they both pass, then it says there's 3 passing tests, and if one of them fails, it shows two failures, the second being the mismatch between the first assertion and the second assertion:
Is there a way to avoid this behavior besides using plain deftest? I don't mind doing that, but it's nice when I can :require the one library instead of both (having to pay attention to when I have exactly two assertions in a form).
The text was updated successfully, but these errors were encountered:
If you add another form, like :ignore or something, then the special handling of two expressions will not kick in.
This is due to Expectations continuing to support (defexpect my-test expected-form actual-form) -- it walks the two expressions and if they don't explicitly contain (expect e a) forms, then it assumes you intended this as a short-hand for (defexpect my-test (expect expected-form actual-form))
This has been a bit of a bugbear for me to continue supporting, but there are test suites out there that rely on it... I'll have a think about making it smarter... Perhaps matching any symbol starting with expect and assuming it's a test...
Hey Sean!
I have a macro that creates some set-up and then calls
expect
on the results:This works perfectly when I put it in
defexpect
calls, except when I put two of them in a row with no other calls:If they both pass, then it says there's 3 passing tests, and if one of them fails, it shows two failures, the second being the mismatch between the first assertion and the second assertion:
Is there a way to avoid this behavior besides using plain
deftest
? I don't mind doing that, but it's nice when I can:require
the one library instead of both (having to pay attention to when I have exactly two assertions in a form).The text was updated successfully, but these errors were encountered: