@@ -85,6 +85,7 @@ for (const grpcLibName of ['grpc', '@grpc/grpc-js']) {
8585 }
8686 port = boundPort ;
8787 server . start ( ) ;
88+ done ( ) ;
8889 } ) ;
8990 } ) ;
9091 after ( function ( ) {
@@ -196,17 +197,17 @@ for (const grpcLibName of ['grpc', '@grpc/grpc-js']) {
196197 } ) ;
197198 describe ( 'Call argument handling' , function ( ) {
198199 describe ( 'Unary call' , function ( ) {
199- it ( 'Should handle undefined options' , function ( done ) {
200- var call = client . unary ( { } , metadata , undefined , function ( err , data ) {
200+ it ( 'Should handle missing options' , function ( done ) {
201+ var call = client . unary ( { } , metadata , function ( err , data ) {
201202 assert . ifError ( err ) ;
202203 } ) ;
203204 call . on ( 'metadata' , function ( metadata ) {
204205 assert . deepStrictEqual ( metadata . get ( 'key' ) , [ 'value' ] ) ;
205206 done ( ) ;
206207 } ) ;
207208 } ) ;
208- it ( 'Should handle two undefined arguments ' , function ( done ) {
209- var call = client . unary ( { } , undefined , undefined , function (
209+ it ( 'Should handle missing metadata and options ' , function ( done ) {
210+ var call = client . unary ( { } , function (
210211 err ,
211212 data
212213 ) {
@@ -216,18 +217,10 @@ for (const grpcLibName of ['grpc', '@grpc/grpc-js']) {
216217 done ( ) ;
217218 } ) ;
218219 } ) ;
219- it ( 'Should handle one undefined argument' , function ( done ) {
220- var call = client . unary ( { } , undefined , function ( err , data ) {
221- assert . ifError ( err ) ;
222- } ) ;
223- call . on ( 'metadata' , function ( metadata ) {
224- done ( ) ;
225- } ) ;
226- } ) ;
227220 } ) ;
228221 describe ( 'Client stream call' , function ( ) {
229- it ( 'Should handle undefined options' , function ( done ) {
230- var call = client . clientStream ( metadata , undefined , function (
222+ it ( 'Should handle missing options' , function ( done ) {
223+ var call = client . clientStream ( metadata , function (
231224 err ,
232225 data
233226 ) {
@@ -239,8 +232,8 @@ for (const grpcLibName of ['grpc', '@grpc/grpc-js']) {
239232 } ) ;
240233 call . end ( ) ;
241234 } ) ;
242- it ( 'Should handle two undefined arguments ' , function ( done ) {
243- var call = client . clientStream ( undefined , undefined , function (
235+ it ( 'Should handle missing metadata and options ' , function ( done ) {
236+ var call = client . clientStream ( function (
244237 err ,
245238 data
246239 ) {
@@ -251,60 +244,36 @@ for (const grpcLibName of ['grpc', '@grpc/grpc-js']) {
251244 } ) ;
252245 call . end ( ) ;
253246 } ) ;
254- it ( 'Should handle one undefined argument' , function ( done ) {
255- var call = client . clientStream ( undefined , function ( err , data ) {
256- assert . ifError ( err ) ;
257- } ) ;
258- call . on ( 'metadata' , function ( metadata ) {
259- done ( ) ;
260- } ) ;
261- call . end ( ) ;
262- } ) ;
263247 } ) ;
264248 describe ( 'Server stream call' , function ( ) {
265- it ( 'Should handle undefined options' , function ( done ) {
266- var call = client . serverStream ( { } , metadata , undefined ) ;
249+ it ( 'Should handle missing options' , function ( done ) {
250+ var call = client . serverStream ( { } , metadata ) ;
267251 call . on ( 'data' , function ( ) { } ) ;
268252 call . on ( 'metadata' , function ( metadata ) {
269253 assert . deepStrictEqual ( metadata . get ( 'key' ) , [ 'value' ] ) ;
270254 done ( ) ;
271255 } ) ;
272256 } ) ;
273- it ( 'Should handle two undefined arguments' , function ( done ) {
274- var call = client . serverStream ( { } , undefined , undefined ) ;
275- call . on ( 'data' , function ( ) { } ) ;
276- call . on ( 'metadata' , function ( metadata ) {
277- done ( ) ;
278- } ) ;
279- } ) ;
280- it ( 'Should handle one undefined argument' , function ( done ) {
281- var call = client . serverStream ( { } , undefined ) ;
257+ it ( 'Should handle missing metadata and options' , function ( done ) {
258+ var call = client . serverStream ( { } ) ;
282259 call . on ( 'data' , function ( ) { } ) ;
283260 call . on ( 'metadata' , function ( metadata ) {
284261 done ( ) ;
285262 } ) ;
286263 } ) ;
287264 } ) ;
288265 describe ( 'Bidi stream call' , function ( ) {
289- it ( 'Should handle undefined options' , function ( done ) {
290- var call = client . bidiStream ( metadata , undefined ) ;
266+ it ( 'Should handle missing options' , function ( done ) {
267+ var call = client . bidiStream ( metadata ) ;
291268 call . on ( 'data' , function ( ) { } ) ;
292269 call . on ( 'metadata' , function ( metadata ) {
293270 assert . deepStrictEqual ( metadata . get ( 'key' ) , [ 'value' ] ) ;
294271 done ( ) ;
295272 } ) ;
296273 call . end ( ) ;
297274 } ) ;
298- it ( 'Should handle two undefined arguments' , function ( done ) {
299- var call = client . bidiStream ( undefined , undefined ) ;
300- call . on ( 'data' , function ( ) { } ) ;
301- call . on ( 'metadata' , function ( metadata ) {
302- done ( ) ;
303- } ) ;
304- call . end ( ) ;
305- } ) ;
306- it ( 'Should handle one undefined argument' , function ( done ) {
307- var call = client . bidiStream ( undefined ) ;
275+ it ( 'Should handle missing metadata and options' , function ( done ) {
276+ var call = client . bidiStream ( ) ;
308277 call . on ( 'data' , function ( ) { } ) ;
309278 call . on ( 'metadata' , function ( metadata ) {
310279 done ( ) ;
0 commit comments