Chatwoot/app/javascript/dashboard/store/modules/specs/conversationSearch/getters.spec.js

20 lines
510 B
JavaScript
Raw Normal View History

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 });
});
});