mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Update view counter test for publish return
This commit is contained in:
1 parent
b0774de823
commit
63274d4c43
1 file changed
+6
-2
@@ -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"
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user