@@ -150,7 +150,7 @@ test("5.3", async () => {
150150 initialStateVector . set ( { name : new Name ( "/B" ) , boot : 1636266412 } , 15 ) ;
151151 initialStateVector . set ( { name : new Name ( "/C" ) , boot : 1636266115 } , 25 ) ;
152152
153- const opts : SvSync . Options = { ...baseOpts , svs3 : true , initialStateVector } ;
153+ const opts : SvSync . Options = { ...baseOpts , initialStateVector } ;
154154
155155 const pA0 = await SvSync . create ( { ...opts , describe : "A0" } ) ;
156156 const pB0 = await SvSync . create ( { ...opts , describe : "B0" } ) ;
@@ -198,22 +198,26 @@ test("initialize", async () => {
198198 closers . push ( p0 ) ;
199199 debugHandler . start ( p0 ) ;
200200
201- const n0A = p0 . get ( "/A" ) ;
201+ const n0A = p0 . get ( "/A" , 10 ) ;
202202 n0A . seqNum = 11 ;
203203 n0A . remove ( ) ; // no effect
204- const n0B = p0 . get ( "/B" ) ;
204+ const n0B = p0 . get ( "/N" , 22 ) ;
205205 n0B . seqNum = 12 ;
206- const n0C = p0 . get ( "/C" ) ;
206+ const n0C = p0 . get ( "/N" , 23 ) ;
207207 n0C . seqNum = 13 ;
208208 n0C . seqNum = 3 ; // no effect
209209 await delay ( 200 ) ;
210210 expect ( debugHandler . count ( "0:send" ) ) . toBe ( 1 ) ;
211211
212+ const idA = n0A . id ;
213+ const idB = n0B . id ;
214+ const idC = n0C . id ;
215+
212216 p0 . close ( ) ;
213217 const v0 = p0 . currentStateVector ;
214- expect ( v0 . get ( new Name ( "/A" ) ) ) . toBe ( 11 ) ;
215- expect ( v0 . get ( new Name ( "/B" ) ) ) . toBe ( 12 ) ;
216- expect ( v0 . get ( new Name ( "/C" ) ) ) . toBe ( 13 ) ;
218+ expect ( v0 . get ( idA ) ) . toBe ( 11 ) ;
219+ expect ( v0 . get ( idB ) ) . toBe ( 12 ) ;
220+ expect ( v0 . get ( idC ) ) . toBe ( 13 ) ;
217221 expect ( v0 . get ( new Name ( "/D" ) ) ) . toBe ( 0 ) ;
218222
219223 // eslint-disable-next-line unicorn/prefer-structured-clone
@@ -227,8 +231,8 @@ test("initialize", async () => {
227231 debugHandler . start ( sync ) ;
228232
229233 const n1A = sync . get ( "/A" ) ;
230- const n1B = sync . get ( "/B" ) ;
231- const n1C = sync . get ( "/C" ) ;
234+ const n1B = sync . get ( "/N" , 22 ) ;
235+ const n1C = sync . get ( "/N" , 23 ) ;
232236 const n1D = sync . get ( "/D" ) ;
233237
234238 expect ( n1A . seqNum ) . toBe ( 11 ) ;
@@ -247,8 +251,8 @@ test("initialize", async () => {
247251 expect ( debugHandler . count ( "1:send" ) ) . toBe ( 0 ) ;
248252
249253 expect ( p1 . get ( "/A" ) . seqNum ) . toBe ( 0 ) ;
250- expect ( p1 . get ( "/B" ) . seqNum ) . toBe ( 22 ) ;
251- expect ( p1 . get ( "/C" ) . seqNum ) . toBe ( 3 ) ;
254+ expect ( p1 . get ( idB ) . seqNum ) . toBe ( 22 ) ;
255+ expect ( p1 . get ( idC ) . seqNum ) . toBe ( 3 ) ;
252256 const n1D = p1 . get ( "/D" ) ;
253257 expect ( n1D . seqNum ) . toBe ( 4 ) ;
254258 ++ n1D . seqNum ;
@@ -262,7 +266,7 @@ test("get add", async () => {
262266 initialStateVector . set ( { name : new Name ( "/A" ) , boot : 1736890910 } , 1 ) ;
263267 initialStateVector . set ( { name : new Name ( "/B" ) , boot : 1736890920 } , 1 ) ;
264268
265- const p = await SvSync . create ( { ...baseOpts , svs3 : true , initialStateVector } ) ;
269+ const p = await SvSync . create ( { ...baseOpts , initialStateVector } ) ;
266270 closers . push ( p ) ;
267271
268272 // .get(id)
@@ -295,10 +299,8 @@ test("get add", async () => {
295299test ( "future bootstrap time" , async ( ) => {
296300 const debugHandler = new DebugHandler ( ) ;
297301
298- const opts : SvSync . Options = { ...baseOpts , svs3 : true } ;
299-
300- const pA = await SvSync . create ( { ...opts , describe : "A" } ) ;
301- const pB = await SvSync . create ( { ...opts , describe : "B" } ) ;
302+ const pA = await SvSync . create ( { ...baseOpts , describe : "A" } ) ;
303+ const pB = await SvSync . create ( { ...baseOpts , describe : "B" } ) ;
302304
303305 debugHandler . start ( pA ) ;
304306 debugHandler . start ( pB ) ;
0 commit comments