🐞 fix(test): 优化测试代码
This commit is contained in:
@@ -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} 失败`));
|
||||
|
||||
Reference in New Issue
Block a user