聊天:增加测试条件

This commit is contained in:
liangtongchuan
2021-03-11 12:19:54 +08:00
parent dda0c96e44
commit f23c29b647
+3 -2
View File
@@ -297,7 +297,7 @@ describe('聊天测试', function() {
} }
}); });
} }
}, 50 * (i - 2) * ABI_STAGE.END + 50 * j); }, 50 * (i - 2) * ABI_STAGE.END + 50 * j); // 50ms 为间隔,避免并发导致的连续升星失败
} }
} }
}); });
@@ -362,8 +362,9 @@ describe('聊天测试', function() {
expect(res.data).to.be.an('object'); expect(res.data).to.be.an('object');
expect(res.data.targetRoleId).to.be.equal(roleInfo.roleId); expect(res.data.targetRoleId).to.be.equal(roleInfo.roleId);
expect(Date.parse(res.data.lastReadTime)).to.be.above(Date.parse(res.data.lastChatTime)); expect(Date.parse(res.data.lastReadTime)).to.be.above(Date.parse(res.data.lastChatTime));
expect(res.data.unreadCnt).to.be.equal(0);
done(); done();
}) });
}, 1000); }, 1000);
}); });
}); });