UNPKG

@applicaster/zapp-react-native-ui-components

Version:

Applicaster Zapp React Native ui components for the Quick Brick App

31 lines (26 loc) 695 B
import React from "react"; import { View, Text } from "react-native"; import { render } from "@testing-library/react-native"; import { AppContainer } from "../index"; const styles = { iphone: { background_color: { color: "#ffffffff" }, }, }; jest.mock("@applicaster/zapp-react-native-utils/theme", () => ({ useTheme: jest.fn(() => ({ app_background_color: "rgba(255, 255, 255, 1)", })), })); describe("<AppContainer />", () => { it("renders correctly", () => { const { toJSON } = render( <AppContainer styles={styles}> <View> <Text>I'm an app</Text> </View> </AppContainer> ); expect(toJSON()).toMatchSnapshot(); }); });