From 63274d4c43c532f4eff26db436b6bb8aa4d77fc8 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Wed, 1 Oct 2025 18:21:47 -0400 Subject: [PATCH] Update view counter test for publish return --- tests/view-counter.test.mjs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/view-counter.test.mjs b/tests/view-counter.test.mjs index 88e1ff26..06adc376 100644 --- a/tests/view-counter.test.mjs +++ b/tests/view-counter.test.mjs @@ -577,7 +577,11 @@ async function testRecordVideoViewEmitsJsonPayload() { }; nostrClient.pubkey = ""; - nostrClient.updateWatchHistoryList = async () => ({ ok: true }); + nostrClient.updateWatchHistoryList = async () => { + throw new Error( + "recordVideoView should not invoke updateWatchHistoryList during view publishes" + ); + }; try { const result = await nostrClient.recordVideoView(pointer, { @@ -614,7 +618,7 @@ async function testRecordVideoViewEmitsJsonPayload() { ); assert.equal( - result.view.event.content, + result.event.content, emittedEvent.content, "serialized payload should persist on the emitted event" );