- HERENCIA-SIMCO.md actualizado con directivas v3.7 y v3.8 - Actualizaciones de configuracion Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
34 lines
794 B
TypeScript
34 lines
794 B
TypeScript
// Mock for socket.io
|
|
|
|
export class Server {
|
|
to = jest.fn().mockReturnThis();
|
|
emit = jest.fn();
|
|
in = jest.fn().mockReturnThis();
|
|
}
|
|
|
|
export interface Socket {
|
|
id: string;
|
|
handshake: {
|
|
auth: Record<string, any>;
|
|
query: Record<string, any>;
|
|
headers: Record<string, any>;
|
|
time: string;
|
|
address: string;
|
|
xdomain: boolean;
|
|
secure: boolean;
|
|
issued: number;
|
|
url: string;
|
|
};
|
|
rooms: Set<string>;
|
|
data: any;
|
|
connected: boolean;
|
|
join: (room: string | string[]) => void;
|
|
leave: (room: string) => void;
|
|
emit: (event: string, ...args: any[]) => boolean;
|
|
on: (event: string, listener: Function) => this;
|
|
once: (event: string, listener: Function) => this;
|
|
disconnect: (close?: boolean) => this;
|
|
to: (room: string) => this;
|
|
broadcast: any;
|
|
}
|