diff --git a/services/common/src/components/forms/RenderFileUpload.tsx b/services/common/src/components/forms/RenderFileUpload.tsx index 06a8add66b..7fdd0f3e31 100644 --- a/services/common/src/components/forms/RenderFileUpload.tsx +++ b/services/common/src/components/forms/RenderFileUpload.tsx @@ -196,7 +196,7 @@ export const FileUpload: FC = ({ ) ) { notification.error({ - message: `Failed to upload ${file && file.name ? file.name : ""}: ${errorMessage ? errorMessage : err + message: `Failed to upload ${file?.name ?? ""}: ${errorMessage ?? err }`, duration: 10, }); @@ -252,7 +252,7 @@ export const FileUpload: FC = ({ } notification.error({ - message: `Failed to upload ${file && file.name ? file.name : ""}: ${response.data.status + message: `Failed to upload ${file?.name ?? ""}: ${response.data.status }`, duration: 10, }); diff --git a/services/common/src/components/projects/projectUtils.spec.ts b/services/common/src/components/projects/projectUtils.spec.ts index 92374ddbb1..f37cf954d5 100644 --- a/services/common/src/components/projects/projectUtils.spec.ts +++ b/services/common/src/components/projects/projectUtils.spec.ts @@ -46,8 +46,10 @@ TEST_PARAMETERS.forEach( enumValues.forEach((status) => { it(`Enum value ${status} should be included in testing`, () => { - expect(coreStatuses.includes(status)).toBe(true); - expect(msStatuses.includes(status)).toBe(true); + const coreIncludes = coreStatuses.includes(status); + const msIncludes = msStatuses.includes(status); + expect(coreIncludes).toBe(true); + expect(msIncludes).toBe(true); }); });