{"ScriptPreparationCode":null,"TestCases":[{"Name":"Old","Code":"const parseConsumerDisplayName = (firstName, middleName, lastName) =\u003E {\r\n const fullName = [lastName, firstName, middleName]\r\n .filter(Boolean)\r\n .join(\u0027 \u0027)\r\n .substr(0, 26);\r\n const givenNames = fullName.substring(lastName.length, fullName.length);\r\n\r\n return [givenNames, lastName].join(\u0027 \u0027);\r\n};\r\n\r\nparseConsumerDisplayName(\u0027Test\u0027, \u0027M\u0027, \u0027Name\u0027);\r\nparseConsumerDisplayName(\u0027ReallyReallyLongFirstName\u0027, \u0027M\u0027, \u0027AbsurdlyLongLastName\u0027);","IsDeferred":false},{"Name":"New","Code":"const parseConsumerDisplayName = (firstName, middleName, lastName) =\u003E {\r\n const lastNameLength = lastName.length;\r\n const givenNames = [firstName, middleName].filter(Boolean).join(\u0027 \u0027).substr(0, 26-lastNameLength);\r\n\r\n return [givenNames, lastName].join(\u0027 \u0027);\r\n};\r\n\r\nparseConsumerDisplayName(\u0027Test\u0027, \u0027M\u0027, \u0027Name\u0027);\r\nparseConsumerDisplayName(\u0027ReallyReallyLongFirstName\u0027, \u0027M\u0027, \u0027AbsurdlyLongLastName\u0027);","IsDeferred":false}]}