@@ -130,6 +130,22 @@ describe('ServerDescription', function () {
130130 currentTv : { processId : processIdZero , counter : Long . fromNumber ( 2 ) } ,
131131 newTv : { processId : processIdZero , counter : Long . fromNumber ( 2 ) } ,
132132 out : 0
133+ } ,
134+ {
135+ title : 'when process ids are equal and both counter values are zero bigints' ,
136+ // @ts -expect-error: Testing that the function handles bigints
137+ currentTv : { processId : processIdZero , counter : 0n } ,
138+ // @ts -expect-error: Testing that the function handles bigints
139+ newTv : { processId : processIdZero , counter : 0n } ,
140+ out : 0
141+ } ,
142+ {
143+ title : 'when process ids are equal and both counter values are non-zero bigints' ,
144+ // @ts -expect-error: Testing that the function handles bigints
145+ currentTv : { processId : processIdZero , counter : 2n } ,
146+ // @ts -expect-error: Testing that the function handles bigints
147+ newTv : { processId : processIdZero , counter : 2n } ,
148+ out : 0
133149 }
134150 ] ;
135151 const compareTopologyVersionLessThanTests : CompareTopologyVersionTest [ ] = [
@@ -178,6 +194,12 @@ describe('ServerDescription', function () {
178194 currentTv : { processId : processIdZero , counter : Long . fromNumber ( 3 ) } ,
179195 newTv : { processId : processIdZero , counter : Long . fromNumber ( 2 ) } ,
180196 out : 1
197+ } ,
198+ {
199+ title : 'when processIds are equal but new counter is less than current (bigint)' ,
200+ currentTv : { processId : processIdZero , counter : 3n } ,
201+ newTv : { processId : processIdZero , counter : 2n } ,
202+ out : 1
181203 }
182204 ] ;
183205
0 commit comments