@@ -132,6 +132,26 @@ describe('/types', () => {
132132 assert . equal ( true , ! ! included )
133133 } )
134134} )
135+ describe ( '/functions' , ( ) => {
136+ it ( 'GET' , async ( ) => {
137+ const res = await axios . get ( `${ URL } /functions` )
138+ // console.log('res.data', res.data)
139+ const datum = res . data . find ( ( x ) => x . schema == 'public' )
140+ const notIncluded = res . data . find ( ( x ) => x . schema == 'pg_toast' )
141+ assert . equal ( res . status , STATUS . SUCCESS )
142+ assert . equal ( true , ! ! datum )
143+ assert . equal ( true , ! notIncluded )
144+ } )
145+ it ( 'GET with system functions' , async ( ) => {
146+ const res = await axios . get ( `${ URL } /functions?includeSystemSchemas=true` )
147+ // console.log('res.data', res.data)
148+ const datum = res . data . find ( ( x ) => x . schema == 'public' )
149+ const included = res . data . find ( ( x ) => x . schema == 'pg_catalog' )
150+ assert . equal ( res . status , STATUS . SUCCESS )
151+ assert . equal ( true , ! ! datum )
152+ assert . equal ( true , ! ! included )
153+ } )
154+ } )
135155describe ( '/tables' , async ( ) => {
136156 it ( 'GET' , async ( ) => {
137157 const tables = await axios . get ( `${ URL } /tables` )
0 commit comments