From 61f873e824315a2039468f62c439f1607c703796 Mon Sep 17 00:00:00 2001 From: Jack Greenlee Date: Thu, 19 Sep 2024 15:16:36 -0400 Subject: [PATCH] remove LoadMoreButton test We created this test a while ago intended as an example. We now have other component tests and don't need an example lying around --- www/__tests__/LoadMoreButton.test.tsx | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 www/__tests__/LoadMoreButton.test.tsx diff --git a/www/__tests__/LoadMoreButton.test.tsx b/www/__tests__/LoadMoreButton.test.tsx deleted file mode 100644 index b3c9cc956..000000000 --- a/www/__tests__/LoadMoreButton.test.tsx +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @jest-environment jsdom - */ -import React from 'react'; -import { render, fireEvent, waitFor, screen } from '@testing-library/react-native'; -import LoadMoreButton from '../js/diary/list/LoadMoreButton'; - -describe('LoadMoreButton', () => { - it('renders correctly', async () => { - render( {}}>{}); - await waitFor(() => { - expect(screen.getByTestId('load-button')).toBeTruthy(); - }); - }, 15000); - - it('calls onPressFn when clicked', async () => { - const mockFn = jest.fn(); - const { getByTestId } = render({}); - const loadButton = getByTestId('load-button'); - fireEvent.press(loadButton); - await waitFor(() => { - expect(mockFn).toHaveBeenCalled(); - }); - }, 15000); -});