Skip to content

Commit ad052bd

Browse files
egor-romanovlaktek
authored andcommitted
fix: format in hello spec
1 parent b8e37e5 commit ad052bd

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

test/spec/hello.spec.ts

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -224,17 +224,17 @@ describe('basic tests (hello function)', () => {
224224
* @feature fetch
225225
*/
226226
log('create FunctionsClient')
227-
const fclient = new FunctionsClient(
228-
`http://localhost:${relay.container.getMappedPort(8081)}`, {
229-
customFetch: getCustomFetch(
230-
`http://localhost:${relay.container.getMappedPort(8081)}/${'hello'}`, {
227+
const fclient = new FunctionsClient(`http://localhost:${relay.container.getMappedPort(8081)}`, {
228+
customFetch: getCustomFetch(
229+
`http://localhost:${relay.container.getMappedPort(8081)}/${'hello'}`,
230+
{
231231
method: 'POST',
232232
headers: {
233233
Authorization: `Bearer ${apiKey}`,
234234
},
235-
})
236-
}
237-
)
235+
}
236+
),
237+
})
238238

239239
log('invoke hello')
240240
const { data, error } = await fclient.invoke<string>('', { responseType: 'text' })
@@ -250,17 +250,17 @@ describe('basic tests (hello function)', () => {
250250
* @feature fetch
251251
*/
252252
log('create FunctionsClient')
253-
const fclient = new FunctionsClient(
254-
`http://localhost:${relay.container.getMappedPort(8081)}`, {
255-
customFetch: getCustomFetch(
256-
`http://localhost:${relay.container.getMappedPort(8081)}/${'hello'}`, {
253+
const fclient = new FunctionsClient(`http://localhost:${relay.container.getMappedPort(8081)}`, {
254+
customFetch: getCustomFetch(
255+
`http://localhost:${relay.container.getMappedPort(8081)}/${'hello'}`,
256+
{
257257
method: 'GET',
258258
headers: {
259259
Authorization: `Bearer ${apiKey}`,
260260
},
261-
})
262-
}
263-
)
261+
}
262+
),
263+
})
264264

265265
log('invoke hello')
266266
const { data, error } = await fclient.invoke<string>('', { responseType: 'text' })
@@ -278,19 +278,20 @@ describe('basic tests (hello function)', () => {
278278
*/
279279
const wrongKey = sign({ name: 'anon' }, 'wrong_jwt')
280280
log('create FunctionsClient')
281-
const fclient = new FunctionsClient(
282-
`http://localhost:${relay.container.getMappedPort(8081)}`, {
283-
headers: {
284-
Authorization: `Bearer ${wrongKey}`,
285-
},
286-
customFetch: getCustomFetch(`http://localhost:${relay.container.getMappedPort(8081)}/${'hello'}`, {
281+
const fclient = new FunctionsClient(`http://localhost:${relay.container.getMappedPort(8081)}`, {
282+
headers: {
283+
Authorization: `Bearer ${wrongKey}`,
284+
},
285+
customFetch: getCustomFetch(
286+
`http://localhost:${relay.container.getMappedPort(8081)}/${'hello'}`,
287+
{
287288
method: 'Post',
288289
headers: {
289290
Authorization: `Bearer ${apiKey}`,
290291
},
291-
})
292-
}
293-
)
292+
}
293+
),
294+
})
294295

295296
log('invoke hello with Authorization header')
296297
const { data, error } = await fclient.invoke<string>('hello', {

0 commit comments

Comments
 (0)