Skip to content

Commit

Permalink
Attempt to fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
cdauth committed Apr 26, 2024
1 parent 47ddfa9 commit 469d2ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions integration-tests/src/socket-v2/lines.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ test("Create line (Socket v2)", async () => {
const client1 = await openClient(undefined, SocketVersion.V2);

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({
Expand All @@ -28,6 +21,13 @@ test("Create line (Socket v2)", async () => {
typeId: lineType.id
});

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 expectedLine = {
padId: mapData.id
};
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/src/socket-v2/views.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ test("Edit view (socket v2)", async () => {
const client1 = await openClient(undefined, SocketVersion.V2);

await createTemporaryMapV2(client1, {}, async (createMapData, mapData) => {
const client2 = await openClient(mapData.id, SocketVersion.V2);

const createdView = await client1.addView({
name: "Test view 1",
left: -10,
Expand All @@ -70,6 +68,8 @@ test("Edit view (socket v2)", async () => {
layers: []
});

const client2 = await openClient(mapData.id, SocketVersion.V2);

const onView1 = vi.fn();
client1.on("view", onView1);
const onView2 = vi.fn();
Expand Down

0 comments on commit 469d2ee

Please sign in to comment.