更新network库及core库优化

This commit is contained in:
YHH
2025-08-12 09:39:07 +08:00
parent c178e2fbcc
commit 9f76d37a82
117 changed files with 17988 additions and 4099 deletions

View File

@@ -0,0 +1,27 @@
import 'reflect-metadata';
// Mock WebSocket for testing
(global as any).WebSocket = class MockWebSocket {
onopen: ((event: Event) => void) | null = null;
onmessage: ((event: MessageEvent) => void) | null = null;
onclose: ((event: CloseEvent) => void) | null = null;
onerror: ((event: Event) => void) | null = null;
constructor(public url: string) {}
send(data: string | ArrayBuffer | Blob) {
// Mock implementation
}
close() {
// Mock implementation
}
};
global.beforeEach(() => {
jest.clearAllMocks();
});
global.afterEach(() => {
jest.restoreAllMocks();
});