Files
iNaturalistReactNative/tests/unit/components/INatIcon.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
718 B
JavaScript

import { render, screen } from "@testing-library/react-native";
import { INatIcon } from "components/SharedComponents";
import glyphmap from "components/SharedComponents/INatIcon/glyphmap.json";
import React from "react";
const iconName = "camera";
describe( "INatIcon", () => {
it( "renders correctly", () => {
render(
<INatIcon
name={iconName}
size={20}
color="#4F8EF7"
/>,
);
// Snapshot test
expect( screen ).toMatchSnapshot();
} );
} );
describe( "glyphmap", () => {
it( "is an object", () => {
expect( glyphmap ).toBeInstanceOf( Object );
} );
it( "has icon name as key", () => {
expect( glyphmap ).toHaveProperty( iconName );
} );
} );