Skip to content

Commit 1c42eed

Browse files
committed
Formatter
1 parent bda0f10 commit 1c42eed

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

spec/v1/providers/https.spec.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,20 +179,23 @@ describe('#onCall', () => {
179179
// Regression test for firebase-functions#947
180180
it('should lock to the v1 API even with function.length == 1', async () => {
181181
let gotData: Record<string, any>;
182-
const func = https.onCall(data => {
182+
const func = https.onCall((data) => {
183183
gotData = data;
184184
});
185185

186-
const req = new MockRequest({
187-
data: {"foo": "bar"},
188-
}, {
189-
"content-type": "application/json",
190-
});
191-
req.method = "POST";
186+
const req = new MockRequest(
187+
{
188+
data: { foo: 'bar' },
189+
},
190+
{
191+
'content-type': 'application/json',
192+
}
193+
);
194+
req.method = 'POST';
192195

193196
const response = await runHandler(func, req as any);
194197
expect(response.status).to.equal(200);
195-
expect(gotData).to.deep.equal({"foo": "bar"});
198+
expect(gotData).to.deep.equal({ foo: 'bar' });
196199
});
197200
});
198201

src/providers/https.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ export function _onCallWithOptions(
8080
// onCallHandler sniffs the function length of the passed-in callback
8181
// and the user could have only tried to listen to data. Wrap their handler
8282
// in another handler to avoid accidentally triggering the v2 API
83-
const fixedLen = (data: any, context: CallableContext) => handler(data, context);
83+
const fixedLen = (data: any, context: CallableContext) =>
84+
handler(data, context);
8485
const func: any = onCallHandler({ origin: true, methods: 'POST' }, fixedLen);
8586

8687
func.__trigger = {

0 commit comments

Comments
 (0)