mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
d9a86aa651
Summary: Convert SafeAreaView to ES Module (https://github.com/facebook/react-native/issues/31330). ## Changelog [General] [Changed] - Converted `SafeAreaView` to ES Module. Pull Request resolved: https://github.com/facebook/react-native/pull/31344 Test Plan: Tested that `npm test` passes. Reviewed By: kacieb Differential Revision: D27767463 Pulled By: lunaleaps fbshipit-source-id: fd3aee58ae6d621a292ff3360d8833f5e5007d52
37 lines
897 B
JavaScript
37 lines
897 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');
|
|
import SafeAreaView from '../SafeAreaView';
|
|
const ReactNativeTestTools = require('../../../Utilities/ReactNativeTestTools');
|
|
const View = require('../../View/View');
|
|
const Text = require('../../../Text/Text');
|
|
|
|
describe('<SafeAreaView />', () => {
|
|
it('should render as expected', () => {
|
|
ReactNativeTestTools.expectRendersMatchingSnapshot(
|
|
'SafeAreaView',
|
|
() => (
|
|
<SafeAreaView>
|
|
<View>
|
|
<Text>Hello World!</Text>
|
|
</View>
|
|
</SafeAreaView>
|
|
),
|
|
() => {
|
|
jest.dontMock('../SafeAreaView');
|
|
},
|
|
);
|
|
});
|
|
});
|