|
|
@ -10,13 +10,19 @@ describe('<TrendsPanel />', () => {
|
|
|
|
trends: ImmutableMap({
|
|
|
|
trends: ImmutableMap({
|
|
|
|
items: fromJS([{
|
|
|
|
items: fromJS([{
|
|
|
|
name: 'hashtag 1',
|
|
|
|
name: 'hashtag 1',
|
|
|
|
history: [{ accounts: [] }],
|
|
|
|
history: [{
|
|
|
|
|
|
|
|
day: '1652745600',
|
|
|
|
|
|
|
|
uses: '294',
|
|
|
|
|
|
|
|
accounts: '180',
|
|
|
|
|
|
|
|
}],
|
|
|
|
}]),
|
|
|
|
}]),
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
render(<TrendsPanel limit={1} />, null, store);
|
|
|
|
render(<TrendsPanel limit={1} />, null, store);
|
|
|
|
expect(screen.getByTestId('hashtag')).toHaveTextContent(/hashtag 1/i);
|
|
|
|
expect(screen.getByTestId('hashtag')).toHaveTextContent(/hashtag 1/i);
|
|
|
|
|
|
|
|
expect(screen.getByTestId('hashtag')).toHaveTextContent(/180 people talking/i);
|
|
|
|
|
|
|
|
expect(screen.getByTestId('sparklines')).toBeInTheDocument();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
it('renders multiple trends', () => {
|
|
|
|
it('renders multiple trends', () => {
|
|
|
|