diff --git a/Libraries/Components/ScrollView/__tests__/ScrollView-test.js b/Libraries/Components/ScrollView/__tests__/ScrollView-test.js new file mode 100644 index 00000000000..5f048f7b334 --- /dev/null +++ b/Libraries/Components/ScrollView/__tests__/ScrollView-test.js @@ -0,0 +1,36 @@ +/** + * 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('', () => { + it('should render as expected', () => { + ReactNativeTestTools.expectRendersMatchingSnapshot( + 'ScrollView', + () => ( + + + Hello World! + + + ), + () => { + jest.dontMock('../ScrollView'); + }, + ); + }); +}); diff --git a/Libraries/Components/ScrollView/__tests__/__snapshots__/ScrollView-test.js.snap b/Libraries/Components/ScrollView/__tests__/__snapshots__/ScrollView-test.js.snap new file mode 100644 index 00000000000..7de0741031a --- /dev/null +++ b/Libraries/Components/ScrollView/__tests__/__snapshots__/ScrollView-test.js.snap @@ -0,0 +1,90 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` should render as expected: should deep render when mocked (please verify output manually) 1`] = ` + + + + + Hello World! + + + + +`; + +exports[` should render as expected: should deep render when not mocked (please verify output manually) 1`] = ` + + + + + Hello World! + + + + +`; + +exports[` should render as expected: should shallow render as when mocked 1`] = ` + + + + Hello World! + + + +`; + +exports[` should render as expected: should shallow render as when not mocked 1`] = ` + + + + Hello World! + + + +`;