Fakultas Ilmu Komputer UI

index.test.tsx 502 Bytes
Newer Older
1
import React from 'react';
2
import { render } from '@testing-library/react-native';
3
4
5

import ChooseWeekForNutritionist from '.';

6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
const mockedNavigate = jest.fn();

jest.mock('@react-navigation/native', () => {
  return {
    useNavigation: () => ({
      navigate: mockedNavigate,
    }),
    useRoute: () => ({
      params: {
        id: 1,
      },
    }),
  };
});

21
22
describe('ChooseWeekForNutritionist', () => {
  it('renders correctly', () => {
23
    render(<ChooseWeekForNutritionist />);
24
25
  });
});