🐞 fix(test): 优化测试代码

This commit is contained in:
dcl
2023-02-21 19:41:34 +08:00
committed by liangtongchuan
parent 202b3c8778
commit 9ac146b4b6
4 changed files with 15 additions and 9 deletions
+2 -3
View File
@@ -297,10 +297,9 @@ async function debugSetRoleLv(client: PinusWSClient) {
// 更新用户等级 - 范围[20,100]
const minRoleLv = 20;
return new Promise((resolve, reject) => {
client.request('battle.comBattleHandler.debugSetRoleLv', { targetLv: minRoleLv }, (res) => {
// res.data: { lv: 20, roleId: 'g9Hgrjk6Kh' }
client.request('battle.comBattleHandler.debugSetRoleLv', { magicWord: DEBUG_MAGIC_WORD, targetLv: minRoleLv }, (res) => {
expect(res.data.lv).to.be.equal(minRoleLv);
if (res.data.lv == minRoleLv) {
// console.log(`更新 ${res.data.roleId} 到 ${res.data.lv}`);
resolve('success');
} else {
reject(new Error(`更新 ${res.data.roleId} 失败`));