* 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
10 lines
304 B
JavaScript
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();
|
|
});
|
|
});
|