File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -311,6 +311,40 @@ describe('Vision', function() {
311311 async . each ( shortNames , checkConfig , done ) ;
312312 } ) ;
313313
314+ it ( 'should allow setting imageContext' , function ( done ) {
315+ var imageContext = {
316+ latLongRect : {
317+ minLatLng : {
318+ latitude : 37.420901 ,
319+ longitude : - 122.081293
320+ } ,
321+ maxLatLng : {
322+ latitude : 37.423228 ,
323+ longitude : - 122.086347
324+ }
325+ }
326+ } ;
327+
328+ vision . annotate = function ( config ) {
329+ assert . deepEqual ( config , [
330+ {
331+ image : IMAGES [ 0 ] ,
332+ features : {
333+ type : 'LABEL_DETECTION'
334+ } ,
335+ imageContext : imageContext
336+ }
337+ ] ) ;
338+
339+ done ( ) ;
340+ } ;
341+
342+ vision . detect ( IMAGE , {
343+ types : [ 'label' ] ,
344+ imageContext : imageContext
345+ } , assert . ifError ) ;
346+ } ) ;
347+
314348 it ( 'should allow setting maxResults' , function ( done ) {
315349 var maxResults = 10 ;
316350
You can’t perform that action at this time.
0 commit comments