Files
iNaturalistReactNative/tests/unit/components/SharedComponents/ActivityCount/CommentsCount.test.js
2024-02-21 10:49:08 -08:00

36 lines
880 B
JavaScript

import { render, screen } from "@testing-library/react-native";
import { CommentsCount } from "components/SharedComponents";
import React from "react";
const count = 1;
describe( "CommentsCount", () => {
it( "renders default reliably", () => {
// Snapshot test
render( <CommentsCount count={count} /> );
expect( screen ).toMatchSnapshot();
} );
it( "renders white reliably", () => {
// Snapshot test
render( <CommentsCount count={count} white /> );
expect( screen ).toMatchSnapshot();
} );
it( "renders filled reliably", () => {
// Snapshot test
render( <CommentsCount count={count} filled /> );
expect( screen ).toMatchSnapshot();
} );
// a11y test
it( "should not have accessibility errors", () => {
const activityCount = <CommentsCount count={count} />;
expect( activityCount ).toBeAccessible();
} );
} );