Files
iNaturalistReactNative/tests/unit/components/ObsDetails/FaveButton.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

30 lines
770 B
JavaScript

import FaveButton from "components/ObsDetails/FaveButton";
import React from "react";
import factory from "tests/factory";
import { renderComponent } from "tests/helpers/render";
describe( "FaveButton", () => {
it( "should survive no currentUser", ( ) => {
expect(
( ) => renderComponent(
<FaveButton
observation={factory( "LocalObservation" )}
/>,
),
).not.toThrow( );
} );
it( "should survive no currentUser for an observation w/ existing votes", ( ) => {
const observation = factory( "RemoteObservation", {
votes: [factory( "RemoteVote" )],
} );
expect(
( ) => renderComponent(
<FaveButton
observation={observation}
/>,
),
).not.toThrow( );
} );
} );