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
fix: removed diff rendering from the assertion #8808
base: series/2.x
Are you sure you want to change the base?
Conversation
💵 To receive payouts, sign up on Algora, link your Github account and connect with Stripe/Alipay. |
@ghostdogpr This PR aims to unify rendering logic to SmartAssertions and ordinary assertions to ensure code reusability. But when the |
cc : @kyri-petrou |
cc/ @ghostdogpr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't compile because Diff[A] can only compare 2 values of type A but here we are comparing A and B which are different types. The existing code is using diffProduct which infers the objects to be Any so it can compare anything.
It mean can't we unify this diff rendering to both ordinary and smart assertions? Or Any typecast is required? |
Maybe we can change |
@ghostdogpr This approach making large no of tests flaky to fail. After my trial and error with this equalTo functions of both SmartAssertions and ordinary, I suscept we can't unify the rendering of diff function. Waiting for your final review |
I believe the compile errors are because you changed |
@ghostdogpr The changes made to ordinary assertion to unify the same renderdiff of smartAssertions led to fail large chunks of test. |
@jdegoes @ghostdogpr It's making it hard to use the same render diff logic to both smartAssertions and ordinaryAssertions as they behave differently with their input args. You'll be able to verify through my commits. I have been experimenting with it for a while and it's nearly 60 commits. Waiting for your guidance to solve/alter approaches |
The failing test is of ordinary Assertions changed behavior emitting test fails except lint workflow |
@ghostdogpr PTAL |
I don't have anything better to suggest at the moment 😄 |
@jdegoes It's for your review now |
equalTo
usingDiff
#8664equalTo
usingDiff
#8664Changes Made: