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:
Jason Rasmussen
2024-03-22 18:24:02 -04:00
committed by GitHub
parent b6e4be72f0
commit 6e93ddf2f1
22 changed files with 166 additions and 181 deletions

View File

@@ -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(),
};
};

View 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(),
};
};