Skip to content

v2.9.0 - attributesNotToStringify

Compare
Choose a tag to compare
@TheJaredWilcurt TheJaredWilcurt released this 21 Mar 15:38
· 11 commits to main since this release
d2c97a7

Features:

  • By default, stringifyAttributes will no longer convert object-based style attributes to stringified objects, allowing Vue to convert them to actual DOM valid strings.

Expect snapshot changes similar to this:

-      style="{ top: 0, height: 0, --v-progress-linear-height: '2px' }"
+      style="top: 0px; height: 0px; --v-progress-linear-height: 2px;"

If you prefer the object look, you can set global.vueSnapshots.attributesNotToStringify = [];.

If there are other attributes you want skipped in the stringifyAttributes process, you can add them to the attributesNotToStringify array.

Diff: