-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
If the received is different from the expected in some obvious way, reject it without full diff #6976
Comments
I actually did not dig into it to see where the exact reason for the long running is but I figured it was diffing, hence my suggestion for partial diffing. I'd be curious also why this instance just takes a long time in general if it is an issue with the diffing? |
@cmdcolin Thank you for link to repo! With local version of pending improvement #6961, The size of diff output is 6266344 The test still fails for reason that will take some more time to investigate:
|
Interesting, thanks for taking a look at it and I'm definitely interested to see how this new diff performs. I was basically unsure whether my request was within the scope of jest but it's great to see that there might be some solutions :) |
Interesting, with or without improvement to That is, whether @cmdcolin Without revealing proprietary details, does internal data of your class include a buffer? |
Indeed it did include buffers and that was particularly why I reproduced it in the test |
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🚀 Feature Proposal
Create a way to reject the test without a full diff?
Motivation
This report comes from a instance where I had a unserialized class object with some internal data that I compared to serialized JSON (the expected) and the output was giving memory errors. I should have been serializing the classes themselves but when I forgot to do so I questioned my sanity and the code because of these memory errors and jest never terminating
Example
This code produces the "bug" but since this sort of thing is potentially outside of the scope of bugs I am filing it as feature request
https://github.com/cmdcolin/jest_neverfinish
My only proposal is that somehow this would be "caught" without running forever or producing memory errors but potentially this is misguided
Pitch
If this feature was added to clearly reject something by partially diffing, then it would save headaches that make you think your actual code is faulty instead of the test being faulty!
The text was updated successfully, but these errors were encountered: