core-plugin-api: avoid using suspense mode of useTranslation in tests

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-09-08 10:15:53 +02:00
parent 316c610649
commit 5c3d68fce2
@@ -37,7 +37,9 @@ export const useTranslationRef = <
const internalRef = toInternalTranslationRef(translationRef);
const { t } = useTranslation(internalRef.id);
const { t } = useTranslation(internalRef.id, {
useSuspense: process.env.NODE_ENV !== 'test',
});
const defaultMessages = internalRef.getDefaultMessages();