Skip to content

Commit ddc4897

Browse files
committed
Fix formatting.
1 parent dc7a4ca commit ddc4897

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

spec/common/providers/https.spec.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -814,13 +814,18 @@ describe("onCallHandler", () => {
814814
{
815815
cors: { origin: true, methods: "POST" },
816816
},
817-
(req, resp) => {
817+
() => {
818818
return "hello world";
819819
},
820820
"gcfv1"
821821
);
822822
const resp = await runHandler(fn, mockReq);
823-
expect(JSON.parse(resp.body)).to.deep.equal({ "error": { "status": "INVALID_ARGUMENT", "message": "Unsupported Accept header 'text/event-stream'" } });
823+
expect(JSON.parse(resp.body)).to.deep.equal({
824+
error: {
825+
status: "INVALID_ARGUMENT",
826+
message: "Unsupported Accept header 'text/event-stream'",
827+
},
828+
});
824829
});
825830
});
826831
});

src/common/providers/https.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ function wrapOnCallHandler<Req = any, Res = any>(
785785

786786
if (acceptsStreaming && version === "gcfv1") {
787787
// streaming responses are not supported in v1 callable
788-
throw new HttpsError('invalid-argument', "Unsupported Accept header 'text/event-stream'")
788+
throw new HttpsError("invalid-argument", "Unsupported Accept header 'text/event-stream'");
789789
}
790790

791791
const data: Req = decode(req.body.data);
@@ -844,5 +844,5 @@ function wrapOnCallHandler<Req = any, Res = any>(
844844
res.status(status).send(body);
845845
}
846846
}
847-
}
848-
};
847+
};
848+
}

0 commit comments

Comments
 (0)