Skip to content

Commit b46cd62

Browse files
committed
lint: satisfy oxlint in websocket tests and fragment batching
1 parent f46d26a commit b46cd62

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/loro-websocket/src/server/simple-server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ export class SimpleServer {
493493
}
494494

495495
const batch = {
496-
data: new Array<Uint8Array>(message.fragmentCount),
496+
data: Array.from({ length: message.fragmentCount }, () => new Uint8Array()),
497497
totalSize: message.totalSizeBytes,
498498
received: 0,
499499
header: message,

packages/loro-websocket/tests/e2e.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ describe("E2E: RoomError rejoin policy", () => {
941941

942942
expect(joinCount).toBe(1);
943943

944-
await client.destroy();
944+
client.destroy();
945945
wss.close();
946946
}, 5000);
947947

@@ -998,7 +998,7 @@ describe("E2E: RoomError rejoin policy", () => {
998998
await new Promise(r => setTimeout(r, 200));
999999
expect(joinCount).toBe(2);
10001000

1001-
await client.destroy();
1001+
client.destroy();
10021002
wss.close();
10031003
}, 8000);
10041004
});

0 commit comments

Comments
 (0)