@applicaster/zapp-react-native-ui-components
Version:
Applicaster Zapp React Native ui components for the Quick Brick App
33 lines (27 loc) • 739 B
JavaScript
import React from "react";
import { View, Text } from "react-native";
import { shallow } from "enzyme";
import { shallowToJson } from "enzyme-to-json";
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)",
})),
}));
const { AppContainer } = require("../index");
describe("<AppContainer />", () => {
it("renders correctly", () => {
const wrapper = shallow(
<AppContainer styles={styles}>
<View>
<Text>I'm an app</Text>
</View>
</AppContainer>
);
expect(shallowToJson(wrapper)).toMatchSnapshot();
});
});