Merge pull request #6074 from matrix-org/jryans/test-noise

Reduce noise in tests
This commit is contained in:
J. Ryan Stinnett 2021-05-20 13:50:37 +01:00 committed by GitHub
commit e07e7cf8d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -344,7 +344,10 @@ export function setLanguage(preferredLangs: string | string[]) {
counterpart.registerTranslations(langToUse, langData);
counterpart.setLocale(langToUse);
SettingsStore.setValue("language", null, SettingLevel.DEVICE, langToUse);
console.log("set language to " + langToUse);
// Adds a lot of noise to test runs, so disable logging there.
if (process.env.NODE_ENV !== "test") {
console.log("set language to " + langToUse);
}
// Set 'en' as fallback language:
if (langToUse !== "en") {