feat: Sort contacts via name, email, phone_number, last_activity_at (#1870)

This commit is contained in:
Pranav Raj S
2021-05-13 13:32:19 +05:30
committed by GitHub
parent 368bab2553
commit 0e6cd699e8
24 changed files with 279 additions and 76 deletions

View File

@@ -6,9 +6,13 @@ const { getters } = Contacts;
describe('#getters', () => {
it('getContacts', () => {
const state = {
records: { 1: contactList[0] },
records: { 1: contactList[0], 3: contactList[2] },
sortOrder: [3, 1],
};
expect(getters.getContacts(state)).toEqual([contactList[0]]);
expect(getters.getContacts(state)).toEqual([
contactList[2],
contactList[0],
]);
});
it('getContact', () => {