fix: Update broken specs (#8651)

- Use fakeTimer for time.spec.js
- Use default sort as last_activity_at_desc
- Update specs for getAllConversations getter
This commit is contained in:
Pranav Raj S
2024-01-05 13:09:09 -08:00
committed by GitHub
parent 6e30064421
commit 2c7f93978e
4 changed files with 137 additions and 355 deletions

View File

@@ -108,6 +108,7 @@ const sortConfig = {
};
export const sortComparator = (a, b, sortKey) => {
const [sortMethod, sortDirection] = SORT_OPTIONS[sortKey] || [];
const [sortMethod, sortDirection] =
SORT_OPTIONS[sortKey] || SORT_OPTIONS.last_activity_at_desc;
return sortConfig[sortMethod](a, b, sortDirection);
};