@@ -130,6 +130,22 @@ describe('ServerDescription', function () {
130
130
currentTv : { processId : processIdZero , counter : Long . fromNumber ( 2 ) } ,
131
131
newTv : { processId : processIdZero , counter : Long . fromNumber ( 2 ) } ,
132
132
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
133
149
}
134
150
] ;
135
151
const compareTopologyVersionLessThanTests : CompareTopologyVersionTest [ ] = [
@@ -178,6 +194,12 @@ describe('ServerDescription', function () {
178
194
currentTv : { processId : processIdZero , counter : Long . fromNumber ( 3 ) } ,
179
195
newTv : { processId : processIdZero , counter : Long . fromNumber ( 2 ) } ,
180
196
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
181
203
}
182
204
] ;
183
205
0 commit comments