From 49bf5f5886b9ed280bf1bcc8df15c11e8396b278 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Tue, 29 Sep 2026 02:01:29 -0700 Subject: [PATCH] Remove unsupported API 23 Robolectric test Summary: React Native for Android supports API 24 and newer. Remove the API-23-only `I18nUtil` Robolectric test because running the shared unit suite against that unsupported runtime fails while parsing the package manifest. Restore the test target to its supported SDK and dependency set while leaving the production `ConfigurationCompat` fix unchanged. Changelog: [Internal] - Remove an unsupported API 23 Robolectric test. Differential Revision: D122276097 --- .../react/modules/i18nmanager/I18nUtilTest.kt | 38 ------------------- 1 file changed, 38 deletions(-) delete mode 100644 packages/react-native/ReactAndroid/src/test/java/com/facebook/react/modules/i18nmanager/I18nUtilTest.kt diff --git a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/modules/i18nmanager/I18nUtilTest.kt b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/modules/i18nmanager/I18nUtilTest.kt deleted file mode 100644 index cee9e18a9890..000000000000 --- a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/modules/i18nmanager/I18nUtilTest.kt +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -package com.facebook.react.modules.i18nmanager - -import android.content.Context -import android.content.pm.ApplicationInfo -import org.assertj.core.api.Assertions.assertThat -import org.junit.Before -import org.junit.Test -import org.junit.runner.RunWith -import org.robolectric.RobolectricTestRunner -import org.robolectric.RuntimeEnvironment -import org.robolectric.annotation.Config - -@RunWith(RobolectricTestRunner::class) -internal class I18nUtilTest { - private lateinit var context: Context - - @Before - fun setUp() { - context = RuntimeEnvironment.getApplication() - context.applicationInfo.flags = - context.applicationInfo.flags or ApplicationInfo.FLAG_SUPPORTS_RTL - I18nUtil.instance.allowRTL(context, true) - I18nUtil.instance.forceRTL(context, false) - } - - @Test - @Config(sdk = [23], qualifiers = "ar") - fun isRTL_onApi23_usesPreferredLocale() { - assertThat(I18nUtil.instance.isRTL(context)).isTrue() - } -}