Module cleanup and tests
CI / ci (push) Failing after 7s

This commit is contained in:
2026-05-24 23:13:45 +02:00
parent 63d83e999a
commit 5dc9b3b8d4
72 changed files with 2545 additions and 1220 deletions
+24
View File
@@ -241,6 +241,30 @@ describe('ScryingPoolStrip', () => {
const data = strip.getData();
expect(data.hasStreamAccess).toBe(false);
});
it('includes current user when showGMSelfFeed is true', () => {
adapter.settings = { get: vi.fn(() => true) };
adapter.users.all.mockReturnValue([{ id: 'u1' }, { id: 'u2' }]);
const data = strip.getData();
expect(data.participants.map(p => p.userId)).toContain('u1');
expect(data.participants.map(p => p.userId)).toContain('u2');
});
it('excludes current user when showGMSelfFeed is false', () => {
adapter.settings = { get: vi.fn(() => false) };
adapter.users.all.mockReturnValue([{ id: 'u1' }, { id: 'u2' }]);
const data = strip.getData();
// u1 is the current user (mocked in beforeEach), should be excluded
expect(data.participants.map(p => p.userId)).not.toContain('u1');
expect(data.participants.map(p => p.userId)).toContain('u2');
});
it('includes all users when settings is unavailable (defaults to true)', () => {
// no adapter.settings — fallback to true
adapter.users.all.mockReturnValue([{ id: 'u1' }, { id: 'u2' }]);
const data = strip.getData();
expect(data.participants.length).toBe(2);
});
});
describe('_attachVideoStream() (Story 5.1)', () => {