@tellescope/sdk 1.13.1 → 1.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -297,7 +297,6 @@ const access_tests = async () => {
297
297
  'non-admin got message from user and enduser',
298
298
  )
299
299
 
300
- console.log('cleaning up')
301
300
  await Promise.all([
302
301
  await user1.api.endusers.deleteOne(unassignedEnduser.id),
303
302
  await user1.api.endusers.deleteOne(assignedEnduser.id),
@@ -474,6 +473,15 @@ const calendar_events = async () => {
474
473
  await user1.api.endusers.deleteOne(enduser.id)
475
474
  }
476
475
 
476
+ const cleanup_cache = () => {
477
+ user1.loadedSocketEvents = {}
478
+ user2.loadedSocketEvents = {}
479
+ sdkSub.loadedSocketEvents = {}
480
+ sdkOtherSub.loadedSocketEvents = {}
481
+ sdkSubSub.loadedSocketEvents = {}
482
+ enduserSDK.loadedSocketEvents = {}
483
+ }
484
+
477
485
  (async () => {
478
486
  log_header("Sockets")
479
487
 
@@ -490,15 +498,15 @@ const calendar_events = async () => {
490
498
  ])
491
499
  await wait(undefined, AWAIT_SOCKET_DURATION) // wait for socket connections
492
500
 
493
- await basic_tests()
494
- await sub_organization_tests()
495
- await access_tests()
496
- await calendar_events()
497
- await enduser_tests()
498
- await notification_tests()
501
+ cleanup_cache(); await basic_tests()
502
+ cleanup_cache(); await sub_organization_tests()
503
+ cleanup_cache(); await access_tests()
504
+ cleanup_cache(); await calendar_events()
505
+ cleanup_cache(); await enduser_tests()
506
+ cleanup_cache(); await notification_tests()
499
507
 
500
- await deauthentication_tests() // should come last!
501
- await deauthentication_tests(true) // should come last!
508
+ cleanup_cache(); await deauthentication_tests() // should come last!
509
+ cleanup_cache(); await deauthentication_tests(true) // should come last!
502
510
  } catch(err) {
503
511
  console.error(err)
504
512
  }