Open kepi0809 opened 2 years ago
found a solution for this, needed to make .html()
in the expect in every case, so only the syntactic sugar is broken. Perhaps this is worth to mention in the migration guide.
.element
seems to work as well, giving a less prettified/minified output
Any updates on this?
Just for others to reference. This is how I'm using this library in a Vue 3 project. I've created a custom serializer for that project, then passing data into this library. Works for Jest or Vitest.
Works with defaults. Just be aware that not all features that worked on Vue 2 are available on Vue 3, you may need to do:
-expect(wrapper)
+expect(wrapper.html())
.toMatchSnapshot();
in some places if upgrading from Vue 2 to Vue 3.
@kepi0809 @Knogobert @mikemklee
This is a Vue 2 + Jest + CJS library. I'm almost done with a total re-write to Vue 3 + Vitest (and Jest) + ESM. If you want to test it out early:
I have the same error with this package as described here https://github.com/eddyerburgh/jest-serializer-vue/issues/49