测试:清理打印增加注释
This commit is contained in:
@@ -30,13 +30,11 @@ function testGroupMsg(pinusClient: PinusWSClient, roleInfo: any, pinusClientT: P
|
|||||||
const roomId = `${channel}_${channelId}`;
|
const roomId = `${channel}_${channelId}`;
|
||||||
pinusClientT.on(ON_GROUP_MSG_ROUTE, (res) => {
|
pinusClientT.on(ON_GROUP_MSG_ROUTE, (res) => {
|
||||||
checkSuccessResponse(res);
|
checkSuccessResponse(res);
|
||||||
console.log('got res 1:', roomId, res);
|
|
||||||
checkGroupMsg(res.data, roleInfo.roleId, roomId, TEXT_MSG.content);
|
checkGroupMsg(res.data, roleInfo.roleId, roomId, TEXT_MSG.content);
|
||||||
msgReceiveCnt += 1;
|
msgReceiveCnt += 1;
|
||||||
});
|
});
|
||||||
pinusClient.on(ON_GROUP_MSG_ROUTE, (res) => {
|
pinusClient.on(ON_GROUP_MSG_ROUTE, (res) => {
|
||||||
checkSuccessResponse(res);
|
checkSuccessResponse(res);
|
||||||
console.log('got res 2:', roomId, res);
|
|
||||||
checkGroupMsg(res.data, roleInfo.roleId, roomId, TEXT_MSG.content);
|
checkGroupMsg(res.data, roleInfo.roleId, roomId, TEXT_MSG.content);
|
||||||
msgReceiveCnt += 1;
|
msgReceiveCnt += 1;
|
||||||
});
|
});
|
||||||
@@ -75,6 +73,7 @@ describe('聊天测试', function() {
|
|||||||
afterEach(function(done) {
|
afterEach(function(done) {
|
||||||
pinusClient.disconnect();
|
pinusClient.disconnect();
|
||||||
pinusClientT.disconnect();
|
pinusClientT.disconnect();
|
||||||
|
// disconnect 后等待 500ms,供服务器清理环境、退出频道等
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
done();
|
done();
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|||||||
Reference in New Issue
Block a user