@applicaster/zapp-react-native-ui-components
Version:
Applicaster Zapp React Native ui components for the Quick Brick App
21 lines (18 loc) • 615 B
JavaScript
import * as R from "ramda";
import * as React from "react";
import { View } from "react-native";
import { shallow } from "enzyme";
import { shallowToJson } from "enzyme-to-json";
import { elementMapper } from "../elementMapper";
import { elements } from "./testElements";
import { defaultComponents } from "../DefaultComponents";
describe("elementMapper", () => {
it("renders the nodes", () => {
const wrapper = shallow(
<View key={1}>
{R.map(elementMapper(defaultComponents, { testProp: true }), elements)}
</View>
);
expect(shallowToJson(wrapper)).toMatchSnapshot();
});
});