Fix biome lint errors in integration.test.ts

This commit is contained in:
Jared Miller 2026-01-27 17:53:12 -05:00
parent 063564b1cd
commit a07618deb5
Signed by: shmup
GPG key ID: 22B5C6D66A38B06C

View file

@ -1,6 +1,6 @@
import { afterEach, beforeEach, describe, expect, test } from "bun:test"; import { afterEach, beforeEach, describe, expect, test } from "bun:test";
import { decode } from "./protocol";
import type { ServerMessage } from "./protocol"; import type { ServerMessage } from "./protocol";
import { decode } from "./protocol";
import { getOrCreateSession, getSession, removeSession } from "./session"; import { getOrCreateSession, getSession, removeSession } from "./session";
describe("WebSocket concurrent edits integration", () => { describe("WebSocket concurrent edits integration", () => {
@ -263,7 +263,10 @@ describe("WebSocket concurrent edits integration", () => {
// client 1: insert "a" // client 1: insert "a"
text1.insert(0, "a"); text1.insert(0, "a");
ws1.send( ws1.send(
JSON.stringify({ type: "update", data: Array.from(Y.encodeStateAsUpdate(doc1)) }), JSON.stringify({
type: "update",
data: Array.from(Y.encodeStateAsUpdate(doc1)),
}),
); );
await new Promise((r) => setTimeout(r, 30)); await new Promise((r) => setTimeout(r, 30));
@ -277,7 +280,10 @@ describe("WebSocket concurrent edits integration", () => {
} }
text2.insert(text2.length, "b"); text2.insert(text2.length, "b");
ws2.send( ws2.send(
JSON.stringify({ type: "update", data: Array.from(Y.encodeStateAsUpdate(doc2)) }), JSON.stringify({
type: "update",
data: Array.from(Y.encodeStateAsUpdate(doc2)),
}),
); );
await new Promise((r) => setTimeout(r, 30)); await new Promise((r) => setTimeout(r, 30));
@ -290,7 +296,10 @@ describe("WebSocket concurrent edits integration", () => {
} }
text3.insert(text3.length, "c"); text3.insert(text3.length, "c");
ws3.send( ws3.send(
JSON.stringify({ type: "update", data: Array.from(Y.encodeStateAsUpdate(doc3)) }), JSON.stringify({
type: "update",
data: Array.from(Y.encodeStateAsUpdate(doc3)),
}),
); );
await new Promise((r) => setTimeout(r, 200)); await new Promise((r) => setTimeout(r, 200));