Files
iNaturalistReactNative/tests/unit/components/Suggestions/Attribution.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

24 lines
697 B
JavaScript

import { screen } from "@testing-library/react-native";
import Attribution from "components/Suggestions/Attribution";
import React from "react";
import faker from "tests/helpers/faker";
import { renderComponent } from "tests/helpers/render";
const mockObservers = [
faker.person.fullName( ), faker.person.fullName( ), faker.person.fullName( ),
];
const renderAttribution = ( ) => renderComponent(
<Attribution
observers={mockObservers}
/>,
);
describe( "Attribution", ( ) => {
it( "should show attributions", async ( ) => {
renderAttribution( );
const observerName = screen.getByText( new RegExp( mockObservers[0] ) );
expect( observerName ).toBeVisible( );
} );
} );