Files
react-native/Libraries/Components/ScrollView/__tests__/ScrollView-test.js
T
Kacie Bawiec aebeb3b0a9 Add Snapshot Rendering Test to ScrollView
Summary:
As title.

Changelog: [Added] Add snapshot rendering test to ScrollView

Reviewed By: zackargyle, TheSavior

Differential Revision: D20037673

fbshipit-source-id: 4270bc63a6065789f072893756468b67deae169d
2020-02-24 14:48:40 -08:00

37 lines
888 B
JavaScript

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @emails oncall+react_native
* @flow strict-local
*/
'use strict';
const React = require('react');
const ScrollView = require('../ScrollView');
const ReactNativeTestTools = require('../../../Utilities/ReactNativeTestTools');
const View = require('../../View/View');
const Text = require('../../../Text/Text');
describe('<ScrollView />', () => {
it('should render as expected', () => {
ReactNativeTestTools.expectRendersMatchingSnapshot(
'ScrollView',
() => (
<ScrollView>
<View>
<Text>Hello World!</Text>
</View>
</ScrollView>
),
() => {
jest.dontMock('../ScrollView');
},
);
});
});