From 6717628cf05422052ef606b194a4c52855e5ff65 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 8 Feb 2026 00:57:12 +0000 Subject: [PATCH] Fix Application state accessors and test harness mocking Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- tests/helpers/moderation-test-helpers.mjs | 41 +++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/tests/helpers/moderation-test-helpers.mjs b/tests/helpers/moderation-test-helpers.mjs index d2379a22..39545992 100644 --- a/tests/helpers/moderation-test-helpers.mjs +++ b/tests/helpers/moderation-test-helpers.mjs @@ -203,6 +203,47 @@ export async function createModerationAppHarness(options = {}) { const Application = await getApplicationClass(); const app = Object.create(Application.prototype); + app.playbackService = { + _currentVideo: null, + get currentVideo() { + return this._currentVideo; + }, + set currentVideo(value) { + this._currentVideo = value; + }, + }; + + app.authService = { + _pubkey: null, + _currentUserNpub: null, + _activeProfilePubkey: null, + _savedProfiles: [], + get pubkey() { + return this._pubkey; + }, + set pubkey(value) { + this._pubkey = value; + }, + get currentUserNpub() { + return this._currentUserNpub; + }, + set currentUserNpub(value) { + this._currentUserNpub = value; + }, + get activeProfilePubkey() { + return this._activeProfilePubkey; + }, + setActiveProfilePubkey(value) { + this._activeProfilePubkey = value; + }, + get savedProfiles() { + return this._savedProfiles; + }, + setSavedProfiles(value) { + this._savedProfiles = value; + }, + }; + Object.defineProperty(app, "__profiles", { value: new Map(), writable: true,