fix: improve plugins functionality with server management
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
defaultIfEmpty,
|
||||
firstValueFrom
|
||||
} from 'rxjs';
|
||||
import { defaultIfEmpty, firstValueFrom } from 'rxjs';
|
||||
|
||||
import { type Message } from '../../shared-kernel';
|
||||
import { dispatchIncomingMessage } from './messages-incoming.handlers';
|
||||
@@ -69,10 +66,9 @@ describe('dispatchIncomingMessage room-scoped sync', () => {
|
||||
});
|
||||
|
||||
it('sends full sync for requested room even when another room is viewed', async () => {
|
||||
const roomBMessages = [
|
||||
createMessage({ id: 'message-b1', roomId: 'room-b', timestamp: 5 }),
|
||||
createMessage({ id: 'message-b2', roomId: 'room-b', timestamp: 15 })
|
||||
];
|
||||
const roomBMessageOne = createMessage({ id: 'message-b1', roomId: 'room-b', timestamp: 5 });
|
||||
const roomBMessageTwo = createMessage({ id: 'message-b2', roomId: 'room-b', timestamp: 15 });
|
||||
const roomBMessages = [roomBMessageOne, roomBMessageTwo];
|
||||
const getMessages = vi.fn(async (roomId: string) => roomId === 'room-b'
|
||||
? roomBMessages
|
||||
: [createMessage({ id: 'message-a1', roomId: 'room-a', timestamp: 200 })]);
|
||||
|
||||
Reference in New Issue
Block a user