Skip to content

Commit ab55b09

Browse files
committed
fix(transform.test): clean up whitespace and improve formatting in test case
1 parent 0400e57 commit ab55b09

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

packages/openapi-fetch/test/transform/transform.test.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,27 @@ test("transforms date strings to Date objects", async () => {
1414
transform: {
1515
response: (method, path, data) => {
1616
if (!data || typeof data !== "object") return data;
17-
17+
1818
const result = { ...data } as PostResponse;
19-
19+
2020
if (typeof result.created_at === "string") {
2121
result.created_at = new Date(result.created_at);
2222
}
23-
23+
2424
return result;
25-
}
26-
}
25+
},
26+
},
2727
},
28-
async () => Response.json({
29-
id: 1,
30-
title: "Test Post",
31-
created_at: "2023-01-01T00:00:00Z"
32-
})
28+
async () =>
29+
Response.json({
30+
id: 1,
31+
title: "Test Post",
32+
created_at: "2023-01-01T00:00:00Z",
33+
}),
3334
);
3435

3536
const { data } = await client.GET("/posts/{id}", {
36-
params: { path: { id: 1 } }
37+
params: { path: { id: 1 } },
3738
});
3839

3940
const post = data as PostResponse;

0 commit comments

Comments
 (0)