Back out "Update tests to support new didOpen delegate fn" (#49821)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49821

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D70561364

fbshipit-source-id: ca70b8bfcdefefff91d02c6e470610a2e0045cec
This commit is contained in:
Peter Abbondanzo
2025-03-05 18:54:05 -08:00
committed by Facebook GitHub Bot
parent 8f19201c5e
commit 6b38c53d6d
@@ -16,6 +16,7 @@
#include <jsinspector-modern/InspectorInterfaces.h>
#include <jsinspector-modern/InspectorPackagerConnection.h>
#include <functional>
#include <memory>
#include "FollyDynamicMatchers.h"
@@ -40,15 +41,10 @@ class InspectorPackagerConnectionTestBase : public testing::Test {
"my-device",
"my-app",
packagerConnectionDelegates_.make_unique(asyncExecutor_)}) {
auto makeSocket = webSockets_.lazily_make_unique<
const std::string&,
std::weak_ptr<IWebSocketDelegate>>();
ON_CALL(*packagerConnectionDelegate(), connectWebSocket(_, _))
.WillByDefault([makeSocket](auto&&... args) {
auto socket = makeSocket(std::forward<decltype(args)>(args)...);
socket->getDelegate().didOpen();
return std::move(socket);
});
.WillByDefault(webSockets_.lazily_make_unique<
const std::string&,
std::weak_ptr<IWebSocketDelegate>>());
}
void TearDown() override {