replace websocket with sockatrice

This commit is contained in:
seavor 2026-05-07 15:54:59 -05:00
parent 68050b56bc
commit e2319c84db
218 changed files with 89 additions and 9100 deletions

View file

@ -21,8 +21,14 @@ import { ServerDispatch, RoomsDispatch, GameDispatch } from '@app/store';
import { Data } from '@app/types';
import { WebClient, setPendingOptions } from '@app/websocket';
import { WebsocketTypes } from '@app/websocket/types';
import { PROTOCOL_VERSION } from '../../../src/websocket/config';
import { createWebClientRequest, createWebClientResponse } from '@app/api';
import {
CLIENT_CONFIG,
CLIENT_OPTIONS,
PROTOCOL_VERSION,
createWebClientResponse,
} from '@app/api';
export { PROTOCOL_VERSION };
import {
buildResponse,
@ -195,7 +201,12 @@ installMockWebSocket();
beforeEach(() => {
vi.useFakeTimers();
new WebClient(createWebClientRequest(), createWebClientResponse());
new WebClient(
createWebClientResponse(),
CLIENT_CONFIG,
CLIENT_OPTIONS,
PROTOCOL_VERSION,
);
});
afterEach(() => {

View file

@ -9,14 +9,13 @@ import { Data } from '@app/types';
import { store } from '@app/store';
import { WebsocketTypes } from '@app/websocket/types';
import { PROTOCOL_VERSION } from '../../../src/websocket/config';
import {
getMockWebSocket,
getWebClient,
openMockWebSocket,
setPendingOptions,
connectAndHandshake,
PROTOCOL_VERSION,
} from '../helpers/setup';
import {
buildSessionEventMessage,