docbrown/app/javascript/readingList/__tests__/readingList.test.jsx
rhymes 209b0ba607 History and reading list refactoring (#3338)
* Make readingList testable

* Make history and readingList more similar

* Extract ItemListTags component

* Simplify load next page logic

* History and reading list load more should be the same

* Extract ItemListLoadMoreButton component

* Use the same exact CSS for both

* Use empty instead of 0

* Extract ItemListItem component

* Remove unnecessary else

* Same search function

* Use a common module to group related functionality

* Extract loadNextPage and fix load more button presence logic

* Extract toggleTag

* Refactor toggleStatusView and pass page

* Added additional tests
2019-07-02 09:22:21 -04:00

10 lines
304 B
JavaScript

import { h } from 'preact';
import render from 'preact-render-to-json';
import { ReadingList } from '../readingList';
describe('<ReadingList />', () => {
it('renders properly', () => {
const tree = render(<ReadingList availableTags={['discuss']} />);
expect(tree).toMatchSnapshot();
});
});