mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
9c57a7f209
Summary: Changelog: [General][Changed] ActivityIndicator and remove .flow Reviewed By: yungsters Differential Revision: D42203449 fbshipit-source-id: 52ab1111166d23b7304e8406f299d23f9fd6f399
34 lines
919 B
JavaScript
34 lines
919 B
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow strict-local
|
|
* @format
|
|
* @oncall react_native
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
import * as React from 'react';
|
|
|
|
const ReactNativeTestTools = require('../../../Utilities/ReactNativeTestTools');
|
|
const ActivityIndicator = require('../ActivityIndicator').default;
|
|
|
|
describe('<ActivityIndicator />', () => {
|
|
it('should set displayName to prevent <Component /> regressions', () => {
|
|
expect(ActivityIndicator.displayName).toBe('ActivityIndicator');
|
|
});
|
|
|
|
it('should render as expected', () => {
|
|
ReactNativeTestTools.expectRendersMatchingSnapshot(
|
|
'ActivityIndicator',
|
|
() => <ActivityIndicator size="large" color="#0000ff" />,
|
|
() => {
|
|
jest.dontMock('../ActivityIndicator');
|
|
},
|
|
);
|
|
});
|
|
});
|