-
Notifications
You must be signed in to change notification settings - Fork 7
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
Expected and actual values are swapped compared to typical Clojure test runners in test diffs #2775
Comments
+1, I have this same issue. For reference, clojure.test never explicitly says you should put expected before actual, but every single example in the docs is written in the form |
I just tried to reproduce this, and I couldn't. Cursive doesn't actually say "expected" or "actual" in its diff, it just says "left" and "right". Those values seem to be correctly populated in the diff, i.e. the left hand value appears in the left of the diff, and vice versa. I also can't see that any relevant code has changed since this issue was filed, am I missing something? |
It's been long enough I'll have to re-investigate this. But I will do that soon. Thanks! |
Fix released in 1.13.4-eap8 on 2024-07-23. |
Thanks! This is a great improvement! :) |
Fix released in 1.13.4 on 2024-08-06. |
Typically in Clojure tests the expected value comes first and the actual value second.
For example:
(is (= expected actual))
Other test runners then report the expected vs. actual values correctly when the args to
=
are in that order.But in Cursive when you view a failed test diff, it puts the first arg in the Actual column and the second arg in the Expected column.
It would be nice if this matched the typical convention of expected first, actual second.
The text was updated successfully, but these errors were encountered: