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

23 lines
541 B
JavaScript
Raw Normal View History

import { getters } from '../../conversationWatchers';
import watchersData from './fixtures';
describe('#getters', () => {
it('getByConversationId', () => {
const state = { records: { 1: watchersData } };
expect(getters.getByConversationId(state)(1)).toEqual(watchersData);
});
it('getUIFlags', () => {
const state = {
uiFlags: {
isFetching: false,
isUpdating: false,
},
};
expect(getters.getUIFlags(state)).toEqual({
isFetching: false,
isUpdating: false,
});
});
});