Can anyone provide some guidance on how to write tests for react components that use
Localized from @fluent/react? At the minute, I’m constructing a
ReactLocalization instance with no bundles or markup parser for use in tests but this, quite reasonably, leads to warnings from my jest tests that include the following text:
A <Localized /> component was rendered when no localization bundles are present.
I can’t use the instance of
ReactLocalization that I use in production code either because the code I have for building this (copied from another open source project) uses
require.context to load the translations and this is not available in the test environment.
Any advice will be gratefully received!