Files
mattermost-mobile/app/components/channel_loader/channel_loader.test.js
Miguel Alatzar e1c5536da8 [MM 15552] Determine number of placeholder rows from height (#2827)
* Calculate maxRows in ChannelLoader component

* Update rn-placeholder

* Fix style check
2019-05-24 12:01:12 -04:00

29 lines
790 B
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react';
import {shallow} from 'enzyme';
import Preferences from 'mattermost-redux/constants/preferences';
import ChannelLoader from './channel_loader';
jest.mock('rn-placeholder', () => ({
ImageContent: () => {},
}));
describe('ChannelLoader', () => {
const baseProps = {
channelIsLoading: true,
theme: Preferences.THEMES.default,
actions: {
handleSelectChannel: jest.fn(),
setChannelLoading: jest.fn(),
},
};
test('should match snapshot', () => {
const wrapper = shallow(<ChannelLoader {...baseProps}/>);
expect(wrapper.getElement()).toMatchSnapshot();
});
});