@@ -4,7 +4,8 @@ import { pgMeta } from './utils'
4
4
test ( 'list' , async ( ) => {
5
5
const res = await pgMeta . functions . list ( )
6
6
expect ( res . data ?. find ( ( { name } ) => name === 'add' ) ) . toMatchInlineSnapshot (
7
- { id : expect . any ( Number ) } , `
7
+ { id : expect . any ( Number ) } ,
8
+ `
8
9
{
9
10
"args": [
10
11
{
@@ -46,7 +47,8 @@ test('list', async () => {
46
47
"schema": "public",
47
48
"security_definer": false,
48
49
}
49
- ` )
50
+ `
51
+ )
50
52
} )
51
53
52
54
test ( 'list set-returning function with single object limit' , async ( ) => {
@@ -232,7 +234,8 @@ test('retrieve, create, update, delete', async () => {
232
234
config_params : { search_path : 'hooks, auth' , role : 'postgres' } ,
233
235
} )
234
236
expect ( res ) . toMatchInlineSnapshot (
235
- { data : { id : expect . any ( Number ) } } , `
237
+ { data : { id : expect . any ( Number ) } } ,
238
+ `
236
239
{
237
240
"data": {
238
241
"args": [
@@ -282,10 +285,12 @@ test('retrieve, create, update, delete', async () => {
282
285
},
283
286
"error": null,
284
287
}
285
- ` )
288
+ `
289
+ )
286
290
res = await pgMeta . functions . retrieve ( { id : res . data ! . id } )
287
291
expect ( res ) . toMatchInlineSnapshot (
288
- { data : { id : expect . any ( Number ) } } , `
292
+ { data : { id : expect . any ( Number ) } } ,
293
+ `
289
294
{
290
295
"data": {
291
296
"args": [
@@ -335,14 +340,16 @@ test('retrieve, create, update, delete', async () => {
335
340
},
336
341
"error": null,
337
342
}
338
- ` )
343
+ `
344
+ )
339
345
res = await pgMeta . functions . update ( res . data ! . id , {
340
346
name : 'test_func_renamed' ,
341
347
schema : 'test_schema' ,
342
348
definition : 'select b - a' ,
343
349
} )
344
350
expect ( res ) . toMatchInlineSnapshot (
345
- { data : { id : expect . any ( Number ) } } , `
351
+ { data : { id : expect . any ( Number ) } } ,
352
+ `
346
353
{
347
354
"data": {
348
355
"args": [
@@ -392,10 +399,12 @@ test('retrieve, create, update, delete', async () => {
392
399
},
393
400
"error": null,
394
401
}
395
- ` )
402
+ `
403
+ )
396
404
res = await pgMeta . functions . remove ( res . data ! . id )
397
405
expect ( res ) . toMatchInlineSnapshot (
398
- { data : { id : expect . any ( Number ) } } , `
406
+ { data : { id : expect . any ( Number ) } } ,
407
+ `
399
408
{
400
409
"data": {
401
410
"args": [
@@ -445,7 +454,8 @@ test('retrieve, create, update, delete', async () => {
445
454
},
446
455
"error": null,
447
456
}
448
- ` )
457
+ `
458
+ )
449
459
res = await pgMeta . functions . retrieve ( { id : res . data ! . id } )
450
460
expect ( res ) . toMatchObject ( {
451
461
data : null ,
0 commit comments