mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 13:33:55 -07:00
replace websocket with sockatrice
This commit is contained in:
parent
68050b56bc
commit
e2319c84db
218 changed files with 89 additions and 9100 deletions
|
|
@ -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(() => {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue