mirror of
https://github.com/zhigang1992/nativewind.git
synced 2026-06-19 09:57:55 +08:00
issue-340
This commit is contained in:
24
packages/nativewind/__tests__/issue-340.tsx
Normal file
24
packages/nativewind/__tests__/issue-340.tsx
Normal 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();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user