How to test/mock @nuxtjs/i18n? #1294
Unanswered
andorfermichael
asked this question in
Q&A
Replies: 1 comment 5 replies
-
Sorry, don't have experience with such setup. Maybe try asking in Nuxt's Discord, in If you create a minimal repro then if I have some time I might look at it. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What's the best way to mock the i18n module?
I' am using:
"@testing-library/jest-dom": "5.14.1",
"@testing-library/vue": "5.8.2",
"vue-jest": "4.0.1"
"jest": "26.6.3"
I was previously using vue-i18n and now I switched to nuxt-i18n.
Currently my test looks as follows:
While using vue-i18n everything worked as expected, but since I switched the module it throws the following error:
What has to be changed? Is there a better approach?
Beta Was this translation helpful? Give feedback.
All reactions