mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-04-18 13:58:44 -04:00
* (lint) MOB-1063 enforce trailing commas * autofix trailing commas * manually fix newly introduced maxlen violations * add trailing comma convention to i18n build
30 lines
770 B
JavaScript
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( );
|
|
} );
|
|
} );
|