Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
4 votes
0 answers
2k views

Content cannot translated and tests are failed on jest in next-i18next

I am using Next-i18next package for my localization purposes in my project. I successfully rendered translated content on my UI. But when I try to test my content and text with enzym (shallow testing) ...
Efe Nadir's user avatar
22 votes
7 answers
18k views

next-i18next Jest Testing with useTranslation

Testing libs...always fun. I am using next-i18next within my NextJS project. We are using the useTranslation hook with namespaces. When I run my test there is a warning: console.warn react-i18next::...
Phil Lucks's user avatar
  • 4,011
2 votes
0 answers
453 views

How to set up test environment next.js project using next-18next ? when Link of next-18next is imported in a component test are failing

set up of next-i18next in -- i18n.ts const { localeSubpaths } = require('next/config').default().publicRuntimeConfig const path = require('path') const NextI18NextInstance = new NextI18Next({ ...
ashish reddy's user avatar
2 votes
2 answers
6k views

next-i18next unit testing error 'Cannot read property language of undefined' with Link and jest

next-i18next uses it's own Link component to be compatible with locale sub-paths. https://github.com/isaachinman/next-i18next When I try a simple snapshot test I get the error Cannot read property ...
RyanP13's user avatar
  • 7,783