fix unit tests and refactor types

This commit is contained in:
seavor 2026-04-16 12:45:47 -05:00
parent decebc25c7
commit fea21b5057
75 changed files with 908 additions and 501 deletions

View file

@ -1,20 +1,6 @@
vi.mock('../../WebClient', () => ({
WebClient: {
instance: {
protobuf: { sendRoomCommand: vi.fn() },
response: {
room: {
gameCreated: vi.fn(),
joinedGame: vi.fn(),
leaveRoom: vi.fn(),
},
},
},
},
}));
vi.mock('../../WebClient');
import { makeCallbackHelpers } from '../../__mocks__/callbackHelpers';
import { useWebClientCleanup } from '../../__mocks__/helpers';
import { WebClient } from '../../WebClient';
import {
Command_CreateGame_ext,
@ -32,8 +18,6 @@ import { roomSay } from './roomSay';
import { create } from '@bufbuild/protobuf';
import { Mock } from 'vitest';
useWebClientCleanup();
const { invokeOnSuccess } = makeCallbackHelpers(
WebClient.instance.protobuf.sendRoomCommand as Mock,
// sendRoomCommand(roomId, ext, value, options) — options at index 3