karma-snapshot
karma-snapshot copied to clipboard
Snapshot comparison fails when snapshot is huge
Info: Number of tests: 3000+ snapshot size: 80 MB
Problem:
In our environment, the socket gets disconnected while sending the snapshot of size 150+ MB.
I debugged and found the framework overrides karma.complete to send snapshot at the end.
Expectation: The socket should not be disconnected.
Ideas: I was just thinking if we can somehow pass the data to karma server as soon as a suite is completed which would avoid the overhead in the socket.
Any leads on how to fix this and where to look at would be helpful. I would be happy to make a PR for the same.
Hi,
I have fixed this problem in my fork and published here
I would love to create a PR if you would accept.
Thanks :)
Hi, sorry for the delayed response. If you want, I can transfer this repository and npm package to you, so you can properly maintain it.
That sounds good but I would like to get some feedback on the changes I did. Could you at least check that and let me know what you think about the same?
I have documented my changes briefly in this release
I don't think that it is possible to find a nice solution for snapshot testing without rewriting Karma, so as long as it is working and solves the problem it should be fine.