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

25 lines
503 B
JavaScript
Raw Normal View History

import { getters } from '../../contactLabels';
describe('#getters', () => {
it('getContactLabels', () => {
const state = {
records: { 1: ['customer-success', 'on-hold'] },
};
expect(getters.getContactLabels(state)(1)).toEqual([
'customer-success',
'on-hold',
]);
});
it('getUIFlags', () => {
const state = {
uiFlags: {
isFetching: true,
},
};
expect(getters.getUIFlags(state)).toEqual({
isFetching: true,
});
});
});