Skip to content

Commit 7dc26f5

Browse files
motiz88meta-codesync[bot]
authored andcommitted
Allow tests to run against all versions of Hermes (#54011)
Summary: Pull Request resolved: #54011 Gets the `jsinspector-modern` (CDP backend) integration tests in React Native to pass when run against all relevant versions of Hermes: Legacy Hermes (`xplat/hermes`), Static Hermes stable (`xplat/shermes/stable`), and Static Hermes trunk (`xplat/static_h`). This involves disabling the two types of failing test: 1. Tests that should be legitimately disabled because Static Hermes omits the legacy, pre-Fusebox debugger infra (see changes to `ReactInstanceIntegrationTest.cpp`) 2. Tests that should be passing but expose a current bug in Static Hermes (see changes to `JsiIntegrationTest.cpp`) This provides a useful baseline for upcoming work in CDPDebugAPI (etc) across the different versions of Hermes. Changelog: [Internal] Reviewed By: huntie Differential Revision: D83564896 fbshipit-source-id: c27f02266d63d58983c660ba0e4be5c44f02c9b6
1 parent 10c5c75 commit 7dc26f5

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

packages/react-native/ReactCommon/jsinspector-modern/tests/JsiIntegrationTest.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,10 @@ TYPED_TEST(JsiIntegrationHermesTest, EvaluateExpressionInExecutionContext) {
565565
std::to_string(executionContextId)));
566566
}
567567

568+
#if !defined(HERMES_STATIC_HERMES)
569+
// FIXME(T239924718): Breakpoint resolution in Static Hermes is broken for
570+
// locations without column numbers under lazy compilation.
571+
568572
TYPED_TEST(JsiIntegrationHermesTest, ResolveBreakpointAfterEval) {
569573
this->connect();
570574

@@ -645,6 +649,8 @@ TYPED_TEST(JsiIntegrationHermesTest, ResolveBreakpointAfterReload) {
645649
scriptInfo->value()["params"]["scriptId"]);
646650
}
647651

652+
#endif // !defined(HERMES_STATIC_HERMES)
653+
648654
TYPED_TEST(JsiIntegrationHermesTest, CDPAgentReentrancyRegressionTest) {
649655
this->connect();
650656

packages/react-native/ReactCommon/jsinspector-modern/tests/ReactInstanceIntegrationTest.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,9 @@ INSTANTIATE_TEST_SUITE_P(
236236
ReactInstanceVaryingInspectorBackend,
237237
ReactInstanceIntegrationTest,
238238
::testing::Values(
239+
#if !defined(HERMES_STATIC_HERMES)
239240
ReactInstanceIntegrationTestMode::LEGACY_HERMES,
241+
#endif
240242
ReactInstanceIntegrationTestMode::FUSEBOX));
241243

242244
} // namespace facebook::react::jsinspector_modern

0 commit comments

Comments
 (0)