Files
react-native/Libraries/Components/SafeAreaView/__tests__/SafeAreaView-test.js
T
Jorge Rossi d9a86aa651 Convert SafeAreaView to ES Module (#31344)
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
2021-04-14 11:48:42 -07:00

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');
},
);
});
});