[ACS-5857] fixed code smell due to nested template literals

This commit is contained in:
SheenaMalhotra182
2023-09-20 15:47:19 +05:30
parent d94be47ec3
commit b9dfe70f4d
@@ -305,8 +305,11 @@ describe('FormFieldModel', () => {
});
const currentDateTime = new Date();
const formattedDate = format(currentDateTime, 'yyyy-MM-dd');
const formattedTime = format(currentDateTime, 'hh:mm');
const expectedDateTime = format(currentDateTime, 'yyyy-MM-dd hh:mm');
const expectedDateTimeFormat = `${format(currentDateTime, `yyyy-MM-dd'T'hh:mm`)}:00.000Z`;
const expectedDateTimeFormat = formattedDate + `T${formattedTime}:00.000Z`;
expect(field.value).toBe(expectedDateTime);
expect(form.values['datetime']).toEqual(expectedDateTimeFormat);