Files
mattermost-mobile/app/components/error_text/error_text.test.tsx
Daniel Espino García 1c26f14fdb Add import order lint rules (#5672)
* Add import order lint rules

* Address feedback

* Revert change
2021-09-13 10:18:03 +02:00

30 lines
832 B
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {render} from '@testing-library/react-native';
import React from 'react';
import {Preferences} from '@constants';
import ErrorText from './index';
describe('ErrorText', () => {
const baseProps = {
testID: 'error.text',
textStyle: {
fontSize: 14,
marginHorizontal: 15,
},
theme: Preferences.THEMES.denim,
error: 'Username must begin with a letter and contain between 3 and 22 characters including numbers, lowercase letters, and the symbols',
};
test('should match snapshot', () => {
const wrapper = render(
<ErrorText {...baseProps}/>,
);
expect(wrapper.toJSON()).toMatchSnapshot();
});
});