Skip to content

Commit 7f65412

Browse files
fix(cb2-7666): global find and replace axle to fifth wheel coupling (#16)
1 parent 4db659f commit 7f65412

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

tests/createTimestampRecord.test.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -322,10 +322,10 @@ const dbRecord = {
322322
'euroStandard': {
323323
'S': '7',
324324
},
325-
'frontAxleTo5thWheelCouplingMax': {
325+
'frontVehicleTo5thWheelCouplingMax': {
326326
'N': '1900',
327327
},
328-
'frontAxleTo5thWheelCouplingMin': {
328+
'frontVehicleTo5thWheelCouplingMin': {
329329
'N': '1700',
330330
},
331331
'frontAxleTo5thWheelMax': {
@@ -510,8 +510,8 @@ const transformedRecord = {
510510
techRecord_dimensions_width: 2200,
511511
techRecord_drawbarCouplingFitted: true,
512512
techRecord_euroStandard: '7',
513-
techRecord_frontAxleTo5thWheelCouplingMax: 1900,
514-
techRecord_frontAxleTo5thWheelCouplingMin: 1700,
513+
techRecord_frontVehicleTo5thWheelCouplingMax: 1900,
514+
techRecord_frontVehicleTo5thWheelCouplingMin: 1700,
515515
techRecord_frontAxleTo5thWheelMax: 1500,
516516
techRecord_frontAxleTo5thWheelMin: 1200,
517517
techRecord_functionCode: 'A',
@@ -551,26 +551,26 @@ describe('createTimestampRecord', () => {
551551
const techRecords = newImage.techRecord;
552552
delete newImage.techRecord;
553553
const result = createTimestampRecord(newImage, techRecords[0]);
554-
554+
555555
// Ensure result only contains: string, number, array, null or boolean types. No objects
556556
const expectation = Object.values(result).every(entry => {
557-
return typeof(entry) === 'string' ? true
557+
return typeof(entry) === 'string' ? true
558558
: typeof(entry) === 'number' ? true
559-
: Array.isArray(entry) ? true
559+
: Array.isArray(entry) ? true
560560
: typeof(entry) === 'boolean' ? true
561-
: entry === null ? true
561+
: entry === null ? true
562562
: false;
563563
});
564-
564+
565565
expect(expectation).toBeTruthy();
566566
});
567-
567+
568568
it('should transform the dynamodb record correctly', () => {
569569
const newImage = DynamoDB.Converter.unmarshall(dbRecord.dynamodb.NewImage) as LegacyVehicleRecord;
570570
const techRecords = newImage.techRecord;
571571
delete newImage.techRecord;
572572
const result = createTimestampRecord(newImage, techRecords[0]);
573-
573+
574574
expect(result).toEqual(transformedRecord);
575575
});
576576
});

0 commit comments

Comments
 (0)