mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 08:14:47 -07:00
Fix various issues
This commit is contained in:
parent
3001925430
commit
c3ae4cffd6
21 changed files with 130 additions and 121 deletions
|
|
@ -1,10 +1,5 @@
|
|||
import { BackendService } from '../../services/BackendService';
|
||||
import { SessionPersistence } from '../../persistence';
|
||||
|
||||
export function message(userName: string, message: string): void {
|
||||
BackendService.sendSessionCommand('Command_Message', { userName, message }, {
|
||||
onSuccess: () => {
|
||||
SessionPersistence.directMessageSent(userName, message);
|
||||
},
|
||||
});
|
||||
BackendService.sendSessionCommand('Command_Message', { userName, message }, {});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -302,11 +302,6 @@ describe('message', () => {
|
|||
);
|
||||
});
|
||||
|
||||
it('calls directMessageSent on success', () => {
|
||||
message('bob', 'hi');
|
||||
invokeOnSuccess();
|
||||
expect(SessionPersistence.directMessageSent).toHaveBeenCalledWith('bob', 'hi');
|
||||
});
|
||||
});
|
||||
|
||||
describe('ping', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue