Improve performance of mock tests
This commit is contained in:
parent
ea9a7385d6
commit
9c072c5bc1
9 changed files with 18 additions and 64 deletions
|
@ -8,7 +8,6 @@ import type { FormatXMLElementFn } from 'intl-messageformat';
|
|||
import type { LocalizerType } from '../types/Util';
|
||||
import type { ReplacementValuesType } from '../types/I18N';
|
||||
import * as log from '../logging/log';
|
||||
import { strictAssert } from '../util/assert';
|
||||
|
||||
export type FullJSXType =
|
||||
| FormatXMLElementFn<JSX.Element | string>
|
||||
|
@ -36,16 +35,6 @@ export function Intl({
|
|||
return null;
|
||||
}
|
||||
|
||||
strictAssert(
|
||||
!localizer.isLegacyFormat(id),
|
||||
`Legacy message format is no longer supported ${id}`
|
||||
);
|
||||
|
||||
strictAssert(
|
||||
!Array.isArray(components),
|
||||
`components cannot be an array for ICU message ${id}`
|
||||
);
|
||||
|
||||
const intl = localizer.getIntl();
|
||||
return <>{intl.formatMessage({ id }, components, {})}</>;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue