@applicaster/zapp-react-native-ui-components
Version:
Applicaster Zapp React Native ui components for the Quick Brick App
32 lines (25 loc) • 755 B
JavaScript
import React from "react";
import { shallow } from "enzyme";
import { shallowToJson } from "enzyme-to-json";
import { Runtime } from "../Runtime";
const RuntimeProps = (isRTL) => ({
config: {
titleColor: "white",
summaryColor: "white",
backgroundColor: "black",
backgroundImage: "https://example.com",
isRTL,
},
start_time: "10:10",
end_time: "11:11",
});
describe("<Runtime />", () => {
it("RTL renders correctly", () => {
const wrapper = shallow(<Runtime {...RuntimeProps(true)} />);
expect(shallowToJson(wrapper)).toMatchSnapshot();
});
it("LTR renders correctly", () => {
const wrapper = shallow(<Runtime {...RuntimeProps(false)} />);
expect(shallowToJson(wrapper)).toMatchSnapshot();
});
});