intlify / vue-i18n-jest

:globe_with_meridians: vue-jest wrapper for i18n custom blocks
MIT License
7 stars 4 forks source link

Test Jest and tag <i18n> inside a component #54

Open ivolkoff opened 1 year ago

ivolkoff commented 1 year ago

Good afternoon, thanks for your work.

I have a problem. Can't test components when there is an tag inside the component.

I example example: https://github.com/ivolkoff/vue-i18n-next-jest-bug

Run test: https://github.com/ivolkoff/vue-i18n-next-jest-bug/blob/main/src/tests/unit/App.spec.js

I expect that the text will change depending on the locale, but it remains the same, since it does not find the block with the translation. https://github.com/ivolkoff/vue-i18n-next-jest-bug/blob/main/src/tests/unit/__snapshots__/App.spec.js.snap

the text transformation plugin used to help me, but now it is not supported https://github.com/intlify/vue-i18n-jest

Is there a way to set up a test?