mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2025-12-23 14:08:56 -05:00
MOB-722: unneeded beforeAll
This commit is contained in:
@@ -4,10 +4,6 @@ import React from "react";
|
||||
import { renderComponent } from "tests/helpers/render";
|
||||
|
||||
describe( "PreMatchLoadingScreen", () => {
|
||||
beforeEach( () => {
|
||||
jest.clearAllMocks();
|
||||
} );
|
||||
|
||||
it( "renders nothing when isLoading is false", () => {
|
||||
renderComponent( <PreMatchLoadingScreen isLoading={false} /> );
|
||||
|
||||
|
||||
@@ -10,15 +10,13 @@ describe( "SaveDiscardButtons", () => {
|
||||
renderComponent( <SaveDiscardButtons handlePress={mockHandlePress} /> );
|
||||
|
||||
const saveButton = screen.getByText( "SAVE" );
|
||||
|
||||
expect( saveButton ).toBeTruthy();
|
||||
|
||||
fireEvent.press( saveButton );
|
||||
|
||||
expect( mockHandlePress ).toHaveBeenCalledWith( "save" );
|
||||
} );
|
||||
|
||||
it( "calls handlePress with 'discard", () => {
|
||||
it( "calls handlePress with 'discard'", () => {
|
||||
const mockHandlePress = jest.fn();
|
||||
|
||||
renderComponent( <SaveDiscardButtons handlePress={mockHandlePress} /> );
|
||||
@@ -28,6 +26,5 @@ describe( "SaveDiscardButtons", () => {
|
||||
fireEvent.press( discardButton );
|
||||
|
||||
expect( mockHandlePress ).toHaveBeenCalledWith( "discard" );
|
||||
expect( mockHandlePress ).toHaveBeenCalledTimes( 1 );
|
||||
} );
|
||||
} );
|
||||
|
||||
Reference in New Issue
Block a user