mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
aebeb3b0a9
Summary: As title. Changelog: [Added] Add snapshot rendering test to ScrollView Reviewed By: zackargyle, TheSavior Differential Revision: D20037673 fbshipit-source-id: 4270bc63a6065789f072893756468b67deae169d
37 lines
888 B
JavaScript
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');
|
|
},
|
|
);
|
|
});
|
|
});
|