Skip to content

Commit 3f848e7

Browse files
huntiefacebook-github-bot
authored andcommitted
Fix test setup for flag used early in HostTarget, restore value (#53355)
Summary: Pull Request resolved: #53355 Follows D80000286, where this flag was forcibly disabled to fix tests. Changelog: [Internal] Reviewed By: hoxyq Differential Revision: D80545210 fbshipit-source-id: 585122ff73e4979c398be6eb03000936d6bd5ce1
1 parent df748ba commit 3f848e7

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

packages/react-native/ReactCommon/jsinspector-modern/InspectorFlags.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@ bool InspectorFlags::getNetworkInspectionEnabled() const {
3434
}
3535

3636
bool InspectorFlags::getPerfMonitorV2Enabled() const {
37-
// loadFlagsAndAssertUnchanged().perfMonitorV2Enabled
38-
// disabling the feature for now while tests are failing
39-
// instead of reverting the whole feature
40-
return false;
37+
return loadFlagsAndAssertUnchanged().perfMonitorV2Enabled;
4138
}
4239

4340
void InspectorFlags::dangerouslyResetFlags() {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ class JsiIntegrationPortableTestBase : public ::testing::Test,
5454
void SetUp() override {
5555
// NOTE: Using SetUp() so we can call virtual methods like
5656
// setupRuntimeBeforeRegistration().
57+
page_ = HostTarget::create(*this, inspectorExecutor_);
5758
instance_ = &page_->registerInstance(instanceTargetDelegate_);
5859
setupRuntimeBeforeRegistration(engineAdapter_->getRuntime());
5960
runtimeTarget_ = &instance_->registerRuntime(
@@ -156,8 +157,7 @@ class JsiIntegrationPortableTestBase : public ::testing::Test,
156157
return result;
157158
}
158159

159-
std::shared_ptr<HostTarget> page_ =
160-
HostTarget::create(*this, inspectorExecutor_);
160+
std::shared_ptr<HostTarget> page_;
161161
InstanceTarget* instance_{};
162162
RuntimeTarget* runtimeTarget_{};
163163

0 commit comments

Comments
 (0)