Need to filter properties from object diffs #7092
sailingKieler
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Do you have reproduction? I've also seen oom crash when equality fails #7009 Then if this turns out to be not fixable, perhaps we can consider adding user-land workaround. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi friends of vitest,
I'm working a lot on and with Langium and Vitest has been huge benefit there.
I just ran into a problem that I would like to compare two objects for equality like
A
andB
be a part of a rather large spider web of objects, und in case of a mismatch the creation of the diff visualization makes the test execution crash after some time of polluting the memory.I saw that you have a config/customization hook for sorting the properties of objects, but no opportunity for filtering them. Ignoring a few known properties being prone to causing problems would help me a lot.
vitest/packages/utils/src/diff/index.ts
Lines 186 to 190 in 4e60333
Ideally I would love if I could contribute a custom
plugin
to the list ofpretty-format
plugins:vitest/packages/utils/src/diff/index.ts
Lines 37 to 57 in 4e60333
Realizing that
getFormatOptions(...)
simply ignores my custom plugin contribution almost made me biting my table 😖vitest/packages/utils/src/diff/index.ts
Lines 180 to 191 in 4e60333
What do think about opening something in that corner?
Beta Was this translation helpful? Give feedback.
All reactions