聊天:登录时处理最近私聊过的用户信息
This commit is contained in:
@@ -154,6 +154,25 @@ describe('聊天测试', function() {
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
it('最近私聊的用户信息', function() {
|
||||
function checkChatInfos(roleInfo) {
|
||||
const chatInfos = roleInfo.recentPrivateChats;
|
||||
if (!chatInfos) {
|
||||
console.warn(`用户${roleInfo.roleName}没有最近的私聊信息`);
|
||||
return;
|
||||
}
|
||||
for (let chatInfo of chatInfos) {
|
||||
expect(chatInfo.targetRoleId).to.be.a('string');
|
||||
expect(chatInfo.targetRoleName).to.be.a('string');
|
||||
expect(Date.parse(chatInfo.lastChatTime)).to.be.a('number');
|
||||
expect(Date.parse(chatInfo.lastReadTime)).to.be.a('number');
|
||||
expect(chatInfo.unreadCnt).to.be.a('number');
|
||||
}
|
||||
}
|
||||
checkChatInfos(roleInfo);
|
||||
checkChatInfos(roleInfoT);
|
||||
});
|
||||
|
||||
it('测试系统频道橙将合成消息', function(done) {
|
||||
let msgReceiveCnt = 0;
|
||||
pinusClientT.on(ON_GROUP_MSG_ROUTE, (res) => {
|
||||
|
||||
Reference in New Issue
Block a user