@fabfit/react-native-parallax-header
Version:
Animated parallax headers for React Native
2 lines • 1.65 kB
JavaScript
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _react=_interopRequireDefault(require("react"));var _reactNative=require("@testing-library/react-native");var _index=_interopRequireDefault(require("./index"));var _jsxFileName="/Users/jamiehalvorson/Documents/FabFit/Development/open-source/react-native-parallax-header/src/parallax-header/index.test.tsx";test('[default] ParallaxHeader matches the snapshot',function(){var _render=(0,_reactNative.render)(_react.default.createElement(_index.default,{__source:{fileName:_jsxFileName,lineNumber:6,columnNumber:49}})),baseElement=_render.baseElement,queryByTestId=_render.queryByTestId;expect(queryByTestId('hero-image')).toBeNull();expect(baseElement).toMatchSnapshot();});test('[custom height] ParallaxHeader matches the snapshot',function(){var _render2=(0,_reactNative.render)(_react.default.createElement(_index.default,{maxHeight:700,minHeight:300,__source:{fileName:_jsxFileName,lineNumber:14,columnNumber:5}})),baseElement=_render2.baseElement,queryByTestId=_render2.queryByTestId;expect(queryByTestId('hero-image')).toBeNull();expect(baseElement).toMatchSnapshot();});test('[heroImage] ParallaxHeader matches the snapshot',function(){var _render3=(0,_reactNative.render)(_react.default.createElement(_index.default,{heroImage:{uri:'https://source.unsplash.com/300x500/?pilates,yoga'},__source:{fileName:_jsxFileName,lineNumber:23,columnNumber:5}})),baseElement=_render3.baseElement,getByTestId=_render3.getByTestId;expect(getByTestId('hero-image')).toBeTruthy();expect(baseElement).toMatchSnapshot();});
//# sourceMappingURL=index.test.js.map