7718cf7d2c
* feat: Search messages by content * Fix search UI * Add specs * chore: Filter search results * Update highlight logic * Rename query to searchTerm Co-authored-by: Sojan <sojan@pepalo.com>
19 lines
510 B
JavaScript
19 lines
510 B
JavaScript
import { getters } from '../../conversationSearch';
|
|
|
|
describe('#getters', () => {
|
|
it('getConversations', () => {
|
|
const state = {
|
|
records: [{ id: 1, messages: [{ id: 1, content: 'value' }] }],
|
|
};
|
|
expect(getters.getConversations(state)).toEqual([
|
|
{ id: 1, messages: [{ id: 1, content: 'value' }] },
|
|
]);
|
|
});
|
|
|
|
it('getUIFlags', () => {
|
|
const state = {
|
|
uiFlags: { isFetching: false },
|
|
};
|
|
expect(getters.getUIFlags(state)).toEqual({ isFetching: false });
|
|
});
|
|
});
|