Skip to content

Commit 0abd93c

Browse files
chore: lint
1 parent 724cd67 commit 0abd93c

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

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

+13-13
Original file line numberDiff line numberDiff line change
@@ -1353,32 +1353,32 @@ describe("client", () => {
13531353
});
13541354
});
13551355

1356-
it('multipart/form-data with a file', async () => {
1357-
const TEST_STRING = 'Hello this is text file string';
1356+
it("multipart/form-data with a file", async () => {
1357+
const TEST_STRING = "Hello this is text file string";
13581358

1359-
const file = new Blob([TEST_STRING], { type: 'text/plain' });
1359+
const file = new Blob([TEST_STRING], { type: "text/plain" });
13601360
const formData = new FormData();
1361-
formData.append('file', file);
1361+
formData.append("file", file);
13621362

13631363
const client = createClient<paths>({ baseUrl });
1364-
useMockRequestHandler({
1364+
useMockRequestHandler({
13651365
baseUrl,
13661366
method: "post",
13671367
path: "/multipart-form-data-file-upload",
1368-
handler: async (data) =>{
1368+
handler: async (data) => {
13691369
// Get text from file and send it back
13701370
const formData = await data.request.formData();
1371-
const text = await (formData.get('file') as File).text()
1372-
return new HttpResponse(JSON.stringify({text}))
1371+
const text = await (formData.get("file") as File).text();
1372+
return new HttpResponse(JSON.stringify({ text }));
13731373
},
13741374
});
1375-
const {data} = await client.POST("/multipart-form-data-file-upload", {
1376-
// TODO: how to get this to accept FormData?
1375+
const { data } = await client.POST("/multipart-form-data-file-upload", {
1376+
// TODO: how to get this to accept FormData?
13771377
body: formData as unknown as string,
1378-
})
1378+
});
13791379

1380-
expect(data?.text).toBe(TEST_STRING)
1381-
})
1380+
expect(data?.text).toBe(TEST_STRING);
1381+
});
13821382
});
13831383

13841384
describe("responses", () => {

0 commit comments

Comments
 (0)