@@ -1040,45 +1040,41 @@ test('/search - filter extension - with top level field filtering', async (t) =>
10401040} )
10411041
10421042test ( '/search - filter extension - failure with incorrect filter-lang' , async ( t ) => {
1043- const error = await t . throwsAsync (
1044- t . context . api . client . post ( 'search' , {
1045- json : {
1046- 'filter-lang' : 'not-cql2-json' ,
1047- filter : {
1048- op : '>' ,
1049- args : [
1050- {
1051- property : 'eo:cloud_cover'
1052- } ,
1053- 0.54
1054- ]
1055- }
1043+ const error = await t . throwsAsync ( async ( ) => t . context . api . client . post ( 'search' , {
1044+ json : {
1045+ 'filter-lang' : 'not-cql2-json' ,
1046+ filter : {
1047+ op : '>' ,
1048+ args : [
1049+ {
1050+ property : 'eo:cloud_cover'
1051+ } ,
1052+ 0.54
1053+ ]
10561054 }
1057- } )
1058- )
1055+ }
1056+ } ) )
10591057 t . is ( error . response . statusCode , 400 )
10601058 t . is ( error . response . body . code , 'BadRequest' )
10611059 t . regex ( error . response . body . description ,
10621060 / .* f i l t e r - l a n g m u s t b e " c q l 2 - j s o n " .* / )
10631061} )
10641062
10651063test ( '/search - filter extension - failure with incorrect filter-crs' , async ( t ) => {
1066- const error = await t . throwsAsync (
1067- t . context . api . client . post ( 'search' , {
1068- json : {
1069- 'filter-crs' : 'not-crs84-url' ,
1070- filter : {
1071- op : '>' ,
1072- args : [
1073- {
1074- property : 'eo:cloud_cover'
1075- } ,
1076- 0.54
1077- ]
1078- }
1064+ const error = await t . throwsAsync ( async ( ) => t . context . api . client . post ( 'search' , {
1065+ json : {
1066+ 'filter-crs' : 'not-crs84-url' ,
1067+ filter : {
1068+ op : '>' ,
1069+ args : [
1070+ {
1071+ property : 'eo:cloud_cover'
1072+ } ,
1073+ 0.54
1074+ ]
10791075 }
1080- } )
1081- )
1076+ }
1077+ } ) )
10821078 t . is ( error . response . statusCode , 400 )
10831079 t . is ( error . response . body . code , 'BadRequest' )
10841080 t . regex ( error . response . body . description ,
0 commit comments