-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Large diffs do not show #2519
Comments
Thanks for the new options. I updated the repro and it does at least now render part of the diff, although it is pretty slow, took around 20 seconds to produce the output on my machine. Still, it's only rendering part of the diff, and it's hiding 4951 lines, is it expected?
|
Yes, look into the new options to display more. |
We are comparing objects as strings, and it is very slow, yes. This is why it’s nor enabled by default. |
The new options are already all set to Regarding text diff performance, I had good experience with jsdiff |
I forgot to pass them down 🤦🏻 |
#2828 removes these options - please, let me know if it works for you |
Does it mean that diffs will not be cut down by any arbitrary limits any more and will always show in full? If so I'm happy to accept that, as it reduces my config. Imho, the default should be unopinionated and just show everything. If users have specific cases where diff gets too large, they can limit it themselves if the new diff package support such a mechanism, but I see that as a completely optional effort on vitest's side to support it. |
Describe the bug
vitest does not render large object diffs. The config options
outputDiffLines: Infinity
, andoutputTruncateLength: Infinity
seem to have no effect, it shows this unhelpful message with no diff visible at all:Reproduction
https://github.com/silverwind/vitest-diff
Clone,
npm install
andnpx vitest
yields this unhelpful output:System Info
System: OS: macOS 13.0.1 CPU: (8) x64 Intel(R) Core(TM) i7-1060NG7 CPU @ 1.20GHz Memory: 153.65 MB / 16.00 GB Shell: 5.9 - /usr/local/bin/zsh Binaries: Node: 19.2.0 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 8.19.3 - /usr/local/bin/npm npmPackages: vitest: 0.25.8 => 0.25.8
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: