mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
8f19201c5e
commit
6b38c53d6d
+4
-8
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user