From 8db7c8e733a0a64ebdafe0ccaaa92647f80b4558 Mon Sep 17 00:00:00 2001 From: Leonardo Venturini Date: Mon, 30 Dec 2024 09:17:14 -0300 Subject: [PATCH] properly test handle state as we cannot intercept errors from bindEnvironment --- packages/ddp-server/livedata_server_tests.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/ddp-server/livedata_server_tests.js b/packages/ddp-server/livedata_server_tests.js index d6315848c3..2de0312cbe 100644 --- a/packages/ddp-server/livedata_server_tests.js +++ b/packages/ddp-server/livedata_server_tests.js @@ -533,12 +533,15 @@ Tinytest.addAsync('livedata server - publication stop should not throw error', a }); initializing = false; - + this.added('issueUnreadCount', user._id, {count}); + + this.onStop(handle.stop); + this.onStop(() => { - console.log('onStop'); - handle.stop(); - }); + test.isTrue(handle._stopped) + }) + this.ready(); } }); @@ -575,8 +578,6 @@ Tinytest.addAsync('livedata server - publication stop should not throw error', a sub5.stop(); - console.log(messages); - cleanup(); });