Fakultas Ilmu Komputer UI

Commit 53cccfa8 authored by Doan Andreas Nathanael's avatar Doan Andreas Nathanael
Browse files

[RED] add test for params to diet recom form

parent 9c0cb6c5
import React from 'react';
import { render } from 'utils/testing';
import { render, waitFor } from 'utils/testing';
import * as ROUTES from 'constants/routes';
import axios from 'axios';
import ReadOnlyDietProfile from '.';
import { mockDietQuestionnaire } from '__mocks__/dietQuestionnaire';
jest.useFakeTimers();
jest.mock('axios');
const mockAxios = axios as jest.Mocked<typeof axios>;
describe('ReadOnlyDietProfile', () => {
it('renders correctly', () => {
render(<ReadOnlyDietProfile />, ROUTES.clientProfileNutritionist, {
routeParams: mockDietQuestionnaire,
});
});
it('shows "Klien belum mengisi diet questionnaire" text if no questionnaire answer is provided yet', () => {
const { getByText } = render(
<ReadOnlyDietProfile />,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment