mirror of
https://github.com/immich-app/immich.git
synced 2026-02-15 05:18:37 +03:00
refactor: server events (#8204)
* refactor: server events * fix typo --------- Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com>
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
import { ICommunicationRepository } from 'src/interfaces/communication.interface';
|
||||
|
||||
export const newCommunicationRepositoryMock = (): jest.Mocked<ICommunicationRepository> => {
|
||||
return {
|
||||
send: jest.fn(),
|
||||
broadcast: jest.fn(),
|
||||
on: jest.fn(),
|
||||
sendServerEvent: jest.fn(),
|
||||
emit: jest.fn(),
|
||||
emitAsync: jest.fn(),
|
||||
};
|
||||
};
|
||||
10
server/test/repositories/event.repository.mock.ts
Normal file
10
server/test/repositories/event.repository.mock.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { IEventRepository } from 'src/interfaces/event.interface';
|
||||
|
||||
export const newEventRepositoryMock = (): jest.Mocked<IEventRepository> => {
|
||||
return {
|
||||
clientSend: jest.fn(),
|
||||
clientBroadcast: jest.fn(),
|
||||
serverSend: jest.fn(),
|
||||
serverSendAsync: jest.fn(),
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user