UNPKG

@daeun2351/react-native-gallery-swiper

Version:

An easy and simple to use React Native component to render a high performant and easily customizable image gallery with common gestures like pan, pinch and double tap. Supporting both iOS and Android. Free and made possible along with costly maintenance

19 lines (14 loc) 547 B
import "react-native"; import React from "react"; import { data } from "./mocks/dataMock"; import GallerySwiper from "./../src/"; // Note: test renderer must be required after react-native. import renderer from "react-test-renderer"; test("Gallery Swiper renders correctly", () => { const gallerySwiper = renderer.create(<GallerySwiper images={data} />).toJSON(); const scrollView = gallerySwiper.children[0]; expect(scrollView.type).toBe("RCTScrollView"); expect(gallerySwiper.props.images.length).toBeGreaterThan(0); });