You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it("Device App and Mobile App should be able to communicate",asyncfunction(){
77
13
78
-
79
-
80
14
constdeviceConfig={
81
15
initData: {
82
16
action: "input",
@@ -95,7 +29,7 @@ it("Device App and Mobile App should be able to communicate", async function ()
95
29
}
96
30
};
97
31
constdeviceApp={
98
-
receiver: createInputReceivers(deviceConfig),//message receivers on the device side
32
+
receiver: testUtil.createInputReceivers(deviceConfig),//message receivers on the device side
99
33
ui: deviceConfig.initData,
100
34
hook:renderHook(()=>useGlobalInputApp(deviceConfig))//calls the hook
101
35
}
@@ -113,7 +47,7 @@ it("Device App and Mobile App should be able to communicate", async function ()
113
47
114
48
constmobileApp={
115
49
con: createMessageConnector(),//creates a connector
116
-
receiver: createInputReceivers(),//create promise objects inside callbacks to make testing more intuitive.
50
+
receiver: testUtil.createInputReceivers(),//create promise objects inside callbacks to make testing more intuitive.
117
51
};
118
52
const{initData: initDataReceivedByMobile}=awaitmobileApp.con.connect(mobileApp.receiver.config,connectionCode)//mobile app connects to the device using the connectionCode that is obtained from the QR Code
119
53
mobileApp.ui=initDataReceivedByMobile;//mobile app display user interface from the initData obtained
@@ -156,7 +90,7 @@ it("Device App and Mobile App should be able to communicate", async function ()
156
90
}
157
91
}
158
92
};
159
-
deviceApp.receiver=createInputReceivers(deviceConfig2);//create promise objects inside callbacks to make testing more intuitive.
93
+
deviceApp.receiver=testUtil.createInputReceivers(deviceConfig2);//create promise objects inside callbacks to make testing more intuitive.
160
94
deviceApp.ui=deviceConfig2.initData;
161
95
162
96
deviceApp.hook.result.current.sendInitData(deviceApp.ui);//device app sends a new mobile user interface
0 commit comments