help me do a jest file for

/* eslint-disable no-tabs */
/* eslint-disable sort-keys */
/* eslint-disable react/function-component-definition */
import * as React from 'react';
import {
	ChangeEvent,
	useState,
	ReactNode,
	useEffect,
} from 'react';
import { useMsal, useAccount } from '@azure/msal-react';
import { RadioChangeEvent, Skeleton } from 'antd';
import { useTranslation } from 'react-i18next';
import 'presentation/styles/Restrictions.css';
import { SentenceCase } from 'data/utils/functions';
import { MPLQuality } from 'domain/models/PLQuality';
import PLQualityService from 'domain/services/PLQualityService';
import ModalRow from 'presentation/components/ModalRow/ModalRow';
import ModalCustom from 'presentation/components/Modal/Modal';

interface QualityInterface {
	month: number,
	errorMessage:() => void,
	saveMessage:() => void,
	setVisibleQuality: (b: boolean) => void,
	visibleQuality: boolean
}

const ModalQuality: React.FC<QualityInterface> = ({
	month, errorMessage, saveMessage, setVisibleQuality, visibleQuality,
}) => {
	const { t } = useTranslation();
	const { accounts } = useMsal();
	const userAccountInfo = useAccount(accounts[0]);

	const [ saving, setSaving ] = useState(false);
	const [ isLoading, setIsLoading ] = useState(true);
	const [ emptyFields, setEmptyFields ] = useState(true);
	const [ plQuality, setPLQuality ] = useState<MPLQuality>();
	const [ fieldsLimitErrors, setFieldsLimitErrors ] = useState<string[]>([]);

	const commonProps = {
		placeholder: '%',
	};

	const items = React.useMemo(() => [
		{
			nameLabel: t('Label', { context: 'Raw_Material', ns: 'weekly' }),
			subTitle: t('Semilla Argentina'),
			children: [ {
				...commonProps,
				descLabel: t('Protein'),
				key: 'materialProtein',
				maxLimit: 40,
				minLimit: 28,
				value: plQuality !== undefined ? plQuality.materialProtein : undefined,
			},
			{
				...commonProps,
				descLabel: t('Grease'),
				key: 'materialFat',
				maxLimit: 25,
				minLimit: 15,
				value: plQuality !== undefined ? plQuality.materialFat : undefined,
			},
			{
				...commonProps,
				descLabel: t('Humidity'),
				key: 'materialMoisture',
				maxLimit: 25,
				minLimit: 6,
				value: plQuality !== undefined ? plQuality.materialMoisture : undefined,
			} ],
		},
		{
			children: [ {
				...commonProps,
				descLabel: t('Fibers'),
				key: 'materialFiber',
				maxLimit: 7,
				minLimit: 3,
				value: plQuality !== undefined ? plQuality.materialFiber : undefined,
			},
			],
		},
		{
			nameLabel: t('Label', { context: 'Temp_Seed_Import', ns: 'weekly' }),
			children: [ {
				...commonProps,
				descLabel: t('Protein'),
				key: 'temporalProteina',
				maxLimit: 40,
				minLimit: 28,
				value: plQuality !== undefined ? plQuality.temporalProteina : undefined,
			},
			{
				...commonProps,
				descLabel: t('Grease'),
				key: 'temporalFat',
				maxLimit: 25,
				minLimit: 15,
				value: plQuality !== undefined ? plQuality.temporalFat : undefined,
			},
			{
				...commonProps,
				descLabel: t('Humidity'),
				key: 'temporalMoisture',
				maxLimit: 25,
				minLimit: 6,
				value: plQuality !== undefined ? plQuality.temporalMoisture : undefined,
			} ],
		},
		{
			children: [

				{
					...commonProps,
					descLabel: t('Fibers'),
					key: 'temporalFiber',
					maxLimit: 7,
					minLimit: 3,
					value: plQuality !== undefined ? plQuality.temporalFiber : undefined,
				},
			],
		},
	], [ t, plQuality ]);

	const checkforEmtpyFields = React.useCallback((comm: MPLQuality): boolean => {
		const values = Object.values(comm);
		const emptyItems = values.some(val => val === undefined || val === '');
		setEmptyFields(emptyItems);
		return emptyItems;
	}, []);

	const handleChange = React.useCallback((
		event: ChangeEvent<HTMLInputElement> | RadioChangeEvent,
		key: string,
		line: number | undefined,
		action?: boolean,
	) => {
		const parseValue = (value: string) => {
			if (Number.isNaN(parseFloat(value))) {
				return undefined;
			}
			return parseFloat(value);
		};
		let qualityItem: MPLQuality = plQuality || {
			materialProtein: undefined,
			materialFat: undefined,
			materialMoisture: undefined,
			materialFiber: undefined,

			temporalProteina: undefined,
			temporalFat: undefined,
			temporalMoisture: undefined,
			temporalFiber: undefined,

			month,
		};
		qualityItem.month = month;

		switch (key) {
		case 'materialProtein':
			qualityItem = {
				...qualityItem,
				materialProtein: parseValue(event.target.value),
			};
			break;
		case 'materialFat':
			qualityItem = {
				...qualityItem,
				materialFat: parseValue(event.target.value),
			};
			break;
		case 'materialMoisture':
			qualityItem = {
				...qualityItem,
				materialMoisture: parseValue(event.target.value),
			};
			break;
		case 'materialFiber':
			qualityItem = {
				...qualityItem,
				materialFiber: parseValue(event.target.value),
			};
			break;

		case 'temporalProteina':
			qualityItem = {
				...qualityItem,
				temporalProteina: parseValue(event.target.value),
			};
			break;
		case 'temporalFat':
			qualityItem = {
				...qualityItem,
				temporalFat: parseValue(event.target.value),
			};
			break;
		case 'temporalMoisture':
			qualityItem = {
				...qualityItem,
				temporalMoisture: parseValue(event.target.value),
			};
			break;
		case 'temporalFiber':
			qualityItem = {
				...qualityItem,
				temporalFiber: parseValue(event.target.value),
			};
			break;
		default:
			break;
		}

		checkforEmtpyFields(qualityItem);
		setPLQuality(qualityItem);

		if (action === true) {
			setFieldsLimitErrors(prevArray => [ ...prevArray, key ]);
		} else {
			setFieldsLimitErrors(prevArray => prevArray?.filter(m => m !== key));
		}
	}, [ plQuality, setPLQuality ]);

	const handleSaveResponse = (response: any, onSuccess: () => void, onError: () => void) => {
		if (response?.success) {
			onSuccess();
		} else {
			onError();
		}
	};

	const cleanPLQuality = () => {
		setVisibleQuality(false);
	};

	const submitPLQuality = async (): Promise<void> => {
		try {
			if (!plQuality) {
				return;
			}

			setSaving(true);
			const plQualityService = new PLQualityService();
			plQuality.user = userAccountInfo?.username || '';
			const response = await plQualityService.SaveQuality(plQuality);

			handleSaveResponse(response, () => {
				saveMessage();
				cleanPLQuality();
			}, errorMessage);
		} catch (e) {
			errorMessage();
		}
		setSaving(false);
	};

	useEffect(() => {
		if (
			(
				fieldsLimitErrors !== undefined ? fieldsLimitErrors?.length > 0 : false
			) === true || emptyFields
		) {
			setEmptyFields(true);
		} else {
			setEmptyFields(false);
		}
	}, [ fieldsLimitErrors ]);

	const onFetch = async (): Promise<void> => {
		try {
			const qualityService = new PLQualityService();
			const response = await qualityService.GetQuality();
			if (response.data) {
				const data = (response.data as MPLQuality);
				setPLQuality(data);
				checkforEmtpyFields(data);
			}
			setIsLoading(false);
		} catch (e) {
			setVisibleQuality(false);
			errorMessage();
		}
	};

	useEffect(() => {
		if (plQuality === undefined) {
			onFetch();
		}
	}, []);

	return (
		<ModalCustom
			className="profitModal"
			disableOkButton={emptyFields}
			onCancel={() => cleanPLQuality()}
			onOk={submitPLQuality}
			saving={saving}
			title={t('Quality')}
			visible={visibleQuality}
		>
			{ isLoading
				? <Skeleton loading paragraph={{ rows: items.length }} style={{ width: '450px' }} />
				: (
					<div className="container">
						{items.map((item, index) => (
							<div className="group-container">
								{item.nameLabel && (
									<div className="itemTile">
										{SentenceCase(t(item.nameLabel))}
									</div>
								)}
								{item.subTitle && (
									<div className="subtitleLabel">
										{SentenceCase(t(item.subTitle))}
									</div>
								)}
								<div className="group-inputs">
									{item.children && item.children.map(childrens => (
										<ModalRow
											key={childrens.key}
											dataTest={childrens.key}
											descLabel={childrens.descLabel}
											handleChange={handleChange}
											item={childrens.key}
											maxLimit={childrens.maxLimit}
											minLimit={childrens.minLimit}
											nameLabel=""
											placeholder={childrens.placeholder}
											subTitle=""
											value={childrens.value}
										/>
									))}
								</div>
							</div>
						))}
					</div>
				)}
		</ModalCustom>
	);
};

export default ModalQuality;


lets try to hit a coverage of 90%