File tree Expand file tree Collapse file tree 3 files changed +18
-10
lines changed Expand file tree Collapse file tree 3 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -322,7 +322,7 @@ GrpcService.convertValue_ = function(value) {
322
322
} ;
323
323
} else if ( is . boolean ( value ) ) {
324
324
convertedValue = {
325
- booleanValue : value
325
+ boolValue : value
326
326
} ;
327
327
} else if ( Buffer . isBuffer ( value ) ) {
328
328
convertedValue = {
@@ -344,7 +344,9 @@ GrpcService.convertValue_ = function(value) {
344
344
} ;
345
345
} else if ( is . array ( value ) ) {
346
346
convertedValue = {
347
- listValue : value . map ( GrpcService . convertValue_ )
347
+ listValue : {
348
+ values : value . map ( GrpcService . convertValue_ )
349
+ }
348
350
} ;
349
351
} else {
350
352
throw new Error ( 'Value of type ' + typeof value + ' not recognized.' ) ;
Original file line number Diff line number Diff line change @@ -243,8 +243,12 @@ describe('Logging', function() {
243
243
// object data
244
244
log . entry ( { delegate : 'my_username' } ) ,
245
245
246
- // null data
247
- log . entry ( { nonValue : null } ) ,
246
+ // various data types
247
+ log . entry ( {
248
+ nonValue : null ,
249
+ boolValue : true ,
250
+ arrayValue : [ 1 , 2 , 3 ]
251
+ } ) ,
248
252
249
253
// nested object data
250
254
log . entry ( {
Original file line number Diff line number Diff line change @@ -692,7 +692,7 @@ describe('GrpcService', function() {
692
692
} ) ;
693
693
694
694
assert . deepEqual ( GrpcService . convertValue_ ( true ) , {
695
- booleanValue : true
695
+ boolValue : true
696
696
} ) ;
697
697
698
698
assert . strictEqual (
@@ -733,11 +733,13 @@ describe('GrpcService', function() {
733
733
it ( 'should convert arrays' , function ( ) {
734
734
var convertedValue = GrpcService . convertValue_ ( [ 1 , 2 , 3 ] ) ;
735
735
736
- assert . deepEqual ( convertedValue . listValue , [
737
- GrpcService . convertValue_ ( 1 ) ,
738
- GrpcService . convertValue_ ( 2 ) ,
739
- GrpcService . convertValue_ ( 3 )
740
- ] ) ;
736
+ assert . deepEqual ( convertedValue . listValue , {
737
+ values : [
738
+ GrpcService . convertValue_ ( 1 ) ,
739
+ GrpcService . convertValue_ ( 2 ) ,
740
+ GrpcService . convertValue_ ( 3 )
741
+ ]
742
+ } ) ;
741
743
} ) ;
742
744
743
745
it ( 'should throw if a type is not recognized' , function ( ) {
You can’t perform that action at this time.
0 commit comments