We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a819e25 commit b09a54eCopy full SHA for b09a54e
web/tests/qunit-tests.js
@@ -44,11 +44,13 @@ test("set_uuid() should set uuid and new presence event should come with new uui
44
expect(2);
45
stop(2);
46
var ch = channel + '-' + ++count;
47
- var uuid = pubnub.get_uuid();
+ var uuid;
48
+ var uuid2;
49
+ var uuid1 = uuid = pubnub.get_uuid();
50
pubnub.subscribe({ channel : ch,
51
connect : function(response) {
52
setTimeout(function() {
- uuid = "efgh"
53
+ uuid2 = uuid = "efgh"
54
pubnub.set_uuid(uuid);
55
}, 3000);
56
},
@@ -58,6 +60,7 @@ test("set_uuid() should set uuid and new presence event should come with new uui
58
60
presence : function(response) {
59
61
if (response.action == "join") {
62
deepEqual(response.uuid, uuid);
63
+ if (response.uuid === uuid2) pubnub.unsubscribe({channel : ch});
64
start();
65
}
66
0 commit comments