Fakultas Ilmu Komputer UI

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

import Questionnaire5 from '.';
Wulan Mantiri's avatar
Wulan Mantiri committed
5
import { mockDietQuestionnaire } from 'mocks/dietQuestionnaire';
6
7
8
9
10
11

const mockedNavigate = jest.fn();

jest.mock('@react-navigation/native', () => {
  return {
    useNavigation: () => ({
12
      reset: mockedNavigate,
13
14
15
16
17
18
    }),
  };
});

describe('Questionnaire5', () => {
  it('renders correctly', () => {
19
    render(<Questionnaire5 route={{ params: mockDietQuestionnaire }} />);
20
21
  });
});