import * as React from 'react';
import { View, ViewStyle } from 'react-native';
import renderer from 'react-test-renderer';
import MDActivityIndicator, { MDActivityIndicatorType } from '../index';
const _style: ViewStyle = {
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
marginVertical: 10,
};
it('renders correctly with defaults', () => {
const component = renderer.create().toJSON();
expect(component).toMatchSnapshot();
});
it('renders correctly with normal roller', () => {
const component = renderer
.create(
加载中
)
.toJSON();
expect(component).toMatchSnapshot();
});
it('renders correctly with column roller', () => {
const component = renderer
.create(
column loading
)
.toJSON();
expect(component).toMatchSnapshot();
});
it('renders correctly with text', () => {
const component = renderer
.create(
loading...
)
.toJSON();
expect(component).toMatchSnapshot();
});
it('renders correctly with dark spinner', () => {
const component = renderer
.create(
加载中...
)
.toJSON();
expect(component).toMatchSnapshot();
});
it('renders correctly with light spinner', () => {
const component = renderer
.create(
加载中...
)
.toJSON();
expect(component).toMatchSnapshot();
});
it('renders correctly with Carousel', () => {
const component = renderer
.create(
)
.toJSON();
expect(component).toMatchSnapshot();
});
it('renders correctly with Carousel set color', () => {
const component = renderer
.create(
)
.toJSON();
expect(component).toMatchSnapshot();
});
it('renders correctly with stop animating', () => {
const component = renderer
.create(
loading...
)
.toJSON();
expect(component).toMatchSnapshot();
});