File tree 1 file changed +23
-0
lines changed
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -436,6 +436,29 @@ describe('Gateway', () => {
436
436
return gateway . connect ( connectionProfile , options )
437
437
. should . be . rejectedWith ( tlsIdentity . type ) ;
438
438
} ) ;
439
+
440
+ it ( 'options do not pollute other gateway instances' , async ( ) => {
441
+ const discoveryEnabledGateway = new Gateway ( ) ;
442
+ await discoveryEnabledGateway . connect ( connectionProfile , {
443
+ wallet,
444
+ identity : options . identity ,
445
+ discovery : {
446
+ enabled : true
447
+ }
448
+ } ) ;
449
+
450
+ const discoveryDisabledGateway = new Gateway ( ) ;
451
+ await discoveryDisabledGateway . connect ( connectionProfile , {
452
+ wallet,
453
+ identity : options . identity ,
454
+ discovery : {
455
+ enabled : false
456
+ }
457
+ } ) ;
458
+
459
+ discoveryEnabledGateway . getOptions ( ) . discovery . enabled . should . be . true ;
460
+ discoveryDisabledGateway . getOptions ( ) . discovery . enabled . should . be . false ;
461
+ } ) ;
439
462
} ) ;
440
463
441
464
describe ( '#getOptions' , ( ) => {
You can’t perform that action at this time.
0 commit comments