chore: Improvements to utils to load article in widget (#7859)
This commit is contained in:
committed by
GitHub
parent
ce4cfee8bd
commit
9322112481
@@ -445,4 +445,33 @@ describe('#getters', () => {
|
||||
};
|
||||
expect(getters.getMessageCount(state)).toEqual(1);
|
||||
});
|
||||
|
||||
it('getLastMessage', () => {
|
||||
const state = {
|
||||
conversations: {
|
||||
1: {
|
||||
id: 1,
|
||||
content: 'Thanks for the help',
|
||||
created_at: 1574075964,
|
||||
message_type: 1,
|
||||
},
|
||||
2: {
|
||||
id: 2,
|
||||
content: 'Yes, It makes sense',
|
||||
created_at: 1574092218,
|
||||
message_type: 1,
|
||||
},
|
||||
3: {
|
||||
id: 3,
|
||||
content: 'Yes, It makes sense',
|
||||
created_at: 1574092218,
|
||||
message_type: 0,
|
||||
},
|
||||
},
|
||||
meta: {
|
||||
userLastSeenAt: 1674075964,
|
||||
},
|
||||
};
|
||||
expect(getters.getLastMessage(state).id).toEqual(3);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user