1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-28 15:22:05 +03:00

Make tests more resilient for React 18 upgrade (#12861)

* Make tests more resilient for React 18 upgrade

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Delint

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2024-08-06 18:22:02 +01:00
committed by GitHub
parent 4e4c5c7768
commit 8285283cc3
35 changed files with 313 additions and 290 deletions

View File

@ -32,6 +32,8 @@ import {
TranslatedString,
UserFriendlyError,
TranslationKey,
IVariables,
Tags,
} from "../src/languageHandler";
import { stubClient } from "./test-utils";
import { setupLanguageMock } from "./setup/setupLanguage";
@ -214,13 +216,7 @@ describe("languageHandler JSX", function () {
const plurals = "common|and_n_others";
const variableSub = "slash_command|ignore_dialog_description";
type TestCase = [
string,
TranslationKey,
Record<string, unknown>,
Record<string, unknown> | undefined,
TranslatedString,
];
type TestCase = [string, TranslationKey, IVariables, Tags | undefined, TranslatedString];
const testCasesEn: TestCase[] = [
// description of the test case, translationString, variables, tags, expected result
["translates a basic string", basicString, {}, undefined, "Rooms"],