@@ -322,10 +322,10 @@ const dbRecord = {
322
322
'euroStandard' : {
323
323
'S' : '7' ,
324
324
} ,
325
- 'frontAxleTo5thWheelCouplingMax ' : {
325
+ 'frontVehicleTo5thWheelCouplingMax ' : {
326
326
'N' : '1900' ,
327
327
} ,
328
- 'frontAxleTo5thWheelCouplingMin ' : {
328
+ 'frontVehicleTo5thWheelCouplingMin ' : {
329
329
'N' : '1700' ,
330
330
} ,
331
331
'frontAxleTo5thWheelMax' : {
@@ -510,8 +510,8 @@ const transformedRecord = {
510
510
techRecord_dimensions_width : 2200 ,
511
511
techRecord_drawbarCouplingFitted : true ,
512
512
techRecord_euroStandard : '7' ,
513
- techRecord_frontAxleTo5thWheelCouplingMax : 1900 ,
514
- techRecord_frontAxleTo5thWheelCouplingMin : 1700 ,
513
+ techRecord_frontVehicleTo5thWheelCouplingMax : 1900 ,
514
+ techRecord_frontVehicleTo5thWheelCouplingMin : 1700 ,
515
515
techRecord_frontAxleTo5thWheelMax : 1500 ,
516
516
techRecord_frontAxleTo5thWheelMin : 1200 ,
517
517
techRecord_functionCode : 'A' ,
@@ -551,26 +551,26 @@ describe('createTimestampRecord', () => {
551
551
const techRecords = newImage . techRecord ;
552
552
delete newImage . techRecord ;
553
553
const result = createTimestampRecord ( newImage , techRecords [ 0 ] ) ;
554
-
554
+
555
555
// Ensure result only contains: string, number, array, null or boolean types. No objects
556
556
const expectation = Object . values ( result ) . every ( entry => {
557
- return typeof ( entry ) === 'string' ? true
557
+ return typeof ( entry ) === 'string' ? true
558
558
: typeof ( entry ) === 'number' ? true
559
- : Array . isArray ( entry ) ? true
559
+ : Array . isArray ( entry ) ? true
560
560
: typeof ( entry ) === 'boolean' ? true
561
- : entry === null ? true
561
+ : entry === null ? true
562
562
: false ;
563
563
} ) ;
564
-
564
+
565
565
expect ( expectation ) . toBeTruthy ( ) ;
566
566
} ) ;
567
-
567
+
568
568
it ( 'should transform the dynamodb record correctly' , ( ) => {
569
569
const newImage = DynamoDB . Converter . unmarshall ( dbRecord . dynamodb . NewImage ) as LegacyVehicleRecord ;
570
570
const techRecords = newImage . techRecord ;
571
571
delete newImage . techRecord ;
572
572
const result = createTimestampRecord ( newImage , techRecords [ 0 ] ) ;
573
-
573
+
574
574
expect ( result ) . toEqual ( transformedRecord ) ;
575
575
} ) ;
576
576
} ) ;
0 commit comments