を持って、私はテストを実行したときに、私はこのエラーを抱えているので、私はJestとReact-Intl libraryをからかっ苦労されています: Invariant Violation: [React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ances
これは、私がクライアントを適切な言語をreact-intlでレンダリングするように設定する方法です。 import localeData from './translations/en.json';
//import localeData from './translations/xx.json'; <-- any language
const render = routes => {
私はutils.jsファイルを持っています。 export function categoryIdToCategoryName(categoryId) {
let name;
switch (categoryId) {
case constants.RISK_CATEGORY_LOW:
name = 'low';
break;
case consta