searchable_channel_list.test.jsx 839 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

import React from 'react';
import {shallow} from 'enzyme';

import SearchableChannelList from 'components/searchable_channel_list.jsx';

describe('components/SearchableChannelList', () => {
    const baseProps = {
        channels: [],
        isSearch: false,
        channelsPerPage: 10,
        nextPage: () => {}, // eslint-disable-line no-empty-function
        search: () => {}, // eslint-disable-line no-empty-function
        handleJoin: () => {}, // eslint-disable-line no-empty-function
        loading: true,
    };

    test('should match init snapshot', () => {
        const wrapper = shallow(
            <SearchableChannelList {...baseProps}/>
        );
        expect(wrapper).toMatchSnapshot();
    });
});