Files
iNaturalistReactNative/tests/unit/components/Developer.test.js
Ryan Stelly b78be9243d lint rule & autofix for "trailing comma" (#3299)
* (lint) MOB-1063 enforce trailing commas

* autofix trailing commas

* manually fix newly introduced maxlen violations

* add trailing comma convention to i18n build
2025-12-22 20:17:13 -06:00

20 lines
672 B
JavaScript

import { fireEvent, screen } from "@testing-library/react-native";
import Developer from "components/Developer/Developer";
import React from "react";
import Mailer from "react-native-mail";
import { renderComponent } from "tests/helpers/render";
jest.mock( "react-native-mail", ( ) => ( {
mail: jest.fn( ),
} ) );
describe( "email logs button", ( ) => {
it( "should open the native email client", async ( ) => {
renderComponent( <Developer /> );
const debugLogButton = await screen.findByText( /EMAIL DEBUG LOGS/ );
expect( debugLogButton ).toBeTruthy( );
fireEvent.press( debugLogButton );
expect( Mailer.mail ).toHaveBeenCalled( );
} );
} );