From 1ae85c2232347feafb6b50390c4cabca2c7f556c Mon Sep 17 00:00:00 2001 From: Candid Dauth Date: Fri, 26 Apr 2024 05:41:19 +0200 Subject: [PATCH] Attempt to fix failing test --- integration-tests/src/socket-v2/lines.test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/integration-tests/src/socket-v2/lines.test.ts b/integration-tests/src/socket-v2/lines.test.ts index 92ecbc02..5078dbff 100644 --- a/integration-tests/src/socket-v2/lines.test.ts +++ b/integration-tests/src/socket-v2/lines.test.ts @@ -13,6 +13,11 @@ test("Create line (Socket v2)", async () => { await createTemporaryMapV2(client1, {}, async (createMapData, mapData) => { const client2 = await openClient(mapData.id, SocketVersion.V2); + const onLine1 = vi.fn(); + client1.on("line", onLine1); + const onLine2 = vi.fn(); + client2.on("line", onLine2); + const lineType = Object.values(client1.types).find((t) => t.type === "line")!; const line = await client1.addLine({ @@ -23,11 +28,6 @@ test("Create line (Socket v2)", async () => { typeId: lineType.id }); - const onLine1 = vi.fn(); - client1.on("line", onLine1); - const onLine2 = vi.fn(); - client2.on("line", onLine2); - const expectedLine = { padId: mapData.id };