issue-340

This commit is contained in:
Mark Lawlor
2022-11-02 09:40:37 +10:00
parent 0f1037abc4
commit 582bc67b4e

View File

@@ -0,0 +1,24 @@
import { render } from "@testing-library/react-native";
import { Text, View } from "react-native";
import { styled } from "../src";
const StyledView = styled(View);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const PostCard = ({ post }: any) => {
return (
<StyledView className="color-slate">
<Text>{post.title}</Text>
<Text>{post.content}</Text>
</StyledView>
);
};
describe("<HomeScreen />", () => {
it("<PostCard /> exists", () => {
const { container } = render(
<PostCard post={{ id: "1234", title: "yes", content: "woo" }} />
);
expect(container).toBeTruthy();
});
});