mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Fix Application state accessors and test harness mocking
Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
bcacf46f8b
commit
6717628cf0
1 file changed
+41
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user