🐞 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
+3 -3
View File
@@ -7,6 +7,7 @@ import 'mocha';
import { PinusWSClient } from 'pinus-robot-plugin';
import { expect } from 'chai';
import { checkSuccessResponse } from './CheckPatten';
import { GVGHeroInfo } from '../../shared/domain/dbGeneral';
describe('gvg激战期测试', function () {
let pinusClient: PinusWSClient;
@@ -57,7 +58,7 @@ describe('gvg激战期测试', function () {
});
// 测试获取城池信息
it('测试获取城池信息', function (done) {
it.skip('测试获取城池信息', function (done) {
const cityId = 1;
// 通过测试接口尝试创建城市
// pinusClient.request('guild.gvgBattleHandler.createCity', {
@@ -315,13 +316,12 @@ export function checkTeam(team: GVGTeamType) {
}
// 检查阵容数据是否合法
export function checkLineup(lineup: LineupHero[]) {
export function checkLineup(lineup: GVGHeroInfo[]) {
expect(lineup).to.be.an('array');
// 循环检查阵容数据是否合法
lineup.forEach((hero) => {
expect(hero.actorId).to.be.a('number');
expect(hero.dataId).to.be.a('number');
expect(hero.order).to.be.a('number');
});
}