LeSuisse/vue-dompurify-html

dompurify-html and vue-test-utils

OmelyanenkoV opened this issue · 1 comments

Hi, when trying to register VueDOMPurifyHTML in shallowMount/mount. I am getting an error saying wrapper is undefined.
image
TypeError: Cannot read properties of undefined (reading 'unmount')

I also tried to register the directive without registering the plugin.
image
In this case, the tests are launched. But the component I need - does not render content.

Approximately so looks usage in a component.
<span v-dompurify-html="t('footer.terms', [LANDING_URL, locale])" /> <span v-dompurify-html="t('footer.privacy', [LANDING_URL, locale])" />

I may be making a mistake during the plugin registration process, or this error may not be related to the plugin, but a test utils problem. But if you can suggest something - I will be grateful.

Hello,

Do you have a minimal reproduction repository where I could see the repository?

From what I see from the screenshots the usage seems fine but without seeing the whole thing it is hard to be helpful.

https://antfu.me/posts/why-reproductions-are-required