mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-04-18 22:11:29 -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
718 B
JavaScript
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 );
|
|
} );
|
|
} );
|