pvp 测试需要确认先获取到 roleInfo

This commit is contained in:
liangtongchuan
2022-01-21 11:11:08 +08:00
parent ec5ccfa5af
commit 66a2f08908
+2 -2
View File
@@ -22,14 +22,14 @@ describe('pvp测试', function () {
before(function (done) { before(function (done) {
const c = new Client(); const c = new Client();
const timer = setInterval(() => { const timer = setInterval(() => {
if (c.client) { if (c.client && c.roleInfo) {
pinusClient = c.client; pinusClient = c.client;
roleInfo = c.roleInfo; roleInfo = c.roleInfo;
console.log('pvp got roleInfo', new Date(), JSON.stringify(roleInfo)); console.log('pvp got roleInfo', new Date(), JSON.stringify(roleInfo));
clearInterval(timer); clearInterval(timer);
done(); done();
} }
}, 1000); }, 500);
}); });
after(function (done) { after(function (done) {