3 ms·
That one is kind of odd. I use a hook for i18n but all it does is pull from a react context. All of our tests that assert on text, assert using the i18n key. S
by ljm 6y ago
That one is kind of odd. I use a hook for i18n but all it does is pull from a react context.
All of our tests that assert on text, assert using the i18n key. So we could re-run the suite in Arabic or Hebrew, for example, and be confident in the result.
There's no reason to mock it. It's an identity function if the translation doesn't exist.