@@ -239,6 +239,18 @@ describe('#unit PackStreamV5', () => {
239
239
return [ nodeStruct , expectedNode , { disableLosslessIntegers : true , useBigInt : false } ]
240
240
}
241
241
242
+ function validWithoutOldIdentifiers ( ) {
243
+ const identity = null
244
+ const labels = [ 'a' , 'b' ]
245
+ const properties = { 'a' : 1 , 'b' : 2 }
246
+ const elementId = 'element_id_1'
247
+ const expectedNode = new Node ( - 1 , labels , properties , elementId )
248
+ const nodeStruct = new Structure ( 0x4e , [
249
+ identity , labels , properties , elementId
250
+ ] )
251
+ return [ nodeStruct , expectedNode , { disableLosslessIntegers : true , useBigInt : false } ]
252
+ }
253
+
242
254
function validWithInt ( ) {
243
255
const identity = int ( 1 )
244
256
const labels = [ 'a' , 'b' ]
@@ -266,7 +278,8 @@ describe('#unit PackStreamV5', () => {
266
278
return [
267
279
validWithNumber ( ) ,
268
280
validWithInt ( ) ,
269
- validWithBigInt ( )
281
+ validWithBigInt ( ) ,
282
+ validWithoutOldIdentifiers ( )
270
283
]
271
284
}
272
285
@@ -297,6 +310,25 @@ describe('#unit PackStreamV5', () => {
297
310
return [ relStruct , expectedRel , { disableLosslessIntegers : true , useBigInt : false } ]
298
311
}
299
312
313
+ function validWithoutOldIdentifiers ( ) {
314
+ const identity = null
315
+ const start = null
316
+ const end = null
317
+ const type = 'KNOWS'
318
+ const properties = { 'a' : 1 , 'b' : 2 }
319
+ const elementId = 'element_id_1'
320
+ const startNodeElementId = 'element_id_2'
321
+ const endNodeElementId = 'element_id_3'
322
+ const expectedRel = new Relationship (
323
+ - 1 , - 1 , - 1 , type , properties ,
324
+ elementId , startNodeElementId , endNodeElementId )
325
+ const relStruct = new Structure ( 0x52 , [
326
+ identity , start , end , type , properties , elementId ,
327
+ startNodeElementId , endNodeElementId
328
+ ] )
329
+ return [ relStruct , expectedRel , { disableLosslessIntegers : true , useBigInt : false } ]
330
+ }
331
+
300
332
function validWithInt ( ) {
301
333
const identity = int ( 1 )
302
334
const start = int ( 2 )
@@ -338,7 +370,8 @@ describe('#unit PackStreamV5', () => {
338
370
return [
339
371
validWithNumber ( ) ,
340
372
validWithInt ( ) ,
341
- validWithBigInt ( )
373
+ validWithBigInt ( ) ,
374
+ validWithoutOldIdentifiers ( )
342
375
]
343
376
}
344
377
@@ -362,6 +395,18 @@ describe('#unit PackStreamV5', () => {
362
395
return [ struct , expectedUnboundRel , { disableLosslessIntegers : true , useBigInt : false } ]
363
396
}
364
397
398
+ function validWithoutOldIdentifiers ( ) {
399
+ const identity = null
400
+ const type = 'DOESNT_KNOW'
401
+ const properties = { 'a' : 1 , 'b' : 2 }
402
+ const elementId = 'element_id_1'
403
+ const expectedUnboundRel = new UnboundRelationship ( - 1 , type , properties , elementId )
404
+ const struct = new Structure ( 0x72 , [
405
+ identity , type , properties , elementId
406
+ ] )
407
+ return [ struct , expectedUnboundRel , { disableLosslessIntegers : true , useBigInt : false } ]
408
+ }
409
+
365
410
function validWithInt ( ) {
366
411
const identity = int ( 1 )
367
412
const type = 'DOESNT_KNOW'
@@ -389,7 +434,8 @@ describe('#unit PackStreamV5', () => {
389
434
return [
390
435
validWithNumber ( ) ,
391
436
validWithInt ( ) ,
392
- validWithBigInt ( )
437
+ validWithBigInt ( ) ,
438
+ validWithoutOldIdentifiers ( )
393
439
]
394
440
}
395
441
0 commit comments