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
Check sender of ENTER presence message in space.enter()
It shouldn’t return as a result of somebody else entering the space.
I’m not sure whether this is the best way of predicating whether or not
to return — perhaps checking for some unique ID on the received ENTER
presence message would be better. But it seems like an OK low-thought
solution at least for the time being.
// Note: There’s no nice way (i.e. without timeouts) to actually check that space.enter() didn’t complete, so we use "did it remove its presence listener?" as a proxy for "did it complete?"
108
+
if(shouldComplete){
109
+
expect(unsubscribeSpy).toHaveBeenCalled();
110
+
}else{
111
+
expect(unsubscribeSpy).not.toHaveBeenCalled();
112
+
}
113
+
});
114
+
});
115
+
116
+
it<SpaceTestContext>('doesn’t complete as a result of a presence message from a client ID that is not ours',async({
0 commit comments