-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
toEqual does not work with Blob objects #7372
Comments
cc @pedrottimark for interest |
I was able to reproduce this. I would be glad to pick this up. Can someone provide me some guidance on how to fix this? |
@matheuspgINF that would be great! I would start with the matcher code here |
Any updates on this? |
Would be nice to be able to test blobs with jest |
Please feel free to submit a PR for this starting with the code linked above. |
I wouldn't mind raising a PR for this if it is something that would be welcome in the core Jest code |
I would also like to see this work, but I don't think we can support this in Jest? I believe |
Then I'm not sure what this is about, Buffers? |
The issue is that you can't simply use |
The part that I don't understand is if |
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. |
π Bug Report
not.toEqual
throws assertion error for 2 not equal Blob's instances.To Reproduce
The test:
You can find
arrayBufferToBlob
andstr2ab
implementation in the codesandbox.io snippet below.I have tried with the new
toStrictEqual
and I receive the same output.It is worth to note that before upgrade
jest
to 23 and babel to 7 (from beta 37) it was working for me. So, looks like a regresion in version 23.Expected behavior
2 different blobs instances are not eqaul.
Link to repl or repo (highly encouraged)
It's not reproduced in codesandox.io but you can see the code - https://codesandbox.io/s/k07x6zpnm3
Run
npx envinfo --preset jest
Paste the results here:
My settings
The text was updated successfully, but these errors were encountered: