测试:战斗测试

This commit is contained in:
luying
2021-11-05 16:28:50 +08:00
parent cb099a69f2
commit e0086c7d16
11 changed files with 861 additions and 61 deletions
+3 -2
View File
@@ -22,7 +22,7 @@ export function checkDisplayItems(items) {
export function checkBattleGoods(items) {
expect(items).to.be.an('array');
items.forEach(item => {
expect(item.dropType).to.be.a('number');
if(item.dropType) expect(item.dropType).to.be.a('number');
if(item.seqId) expect(item.seqId).to.be.a('number');
expect(item.id).to.be.a('number');
expect(item.count).to.be.a('number');
@@ -106,7 +106,7 @@ export function checkTimeStamp(time, len, canBeZero) {
}
}
export function checkWarJson(heroes) {
export function checkWarJson(heroes, cb?) {
expect(heroes).to.be.an('array');
heroes.forEach(hero => {
expect(hero.actorId).to.be.a('number');
@@ -127,5 +127,6 @@ export function checkWarJson(heroes) {
expect(hero.skill).to.be.a('string');
expect(hero.seid).to.be.a('string');
expect(hero.spine).to.be.a('string');
if(cb) cb(hero);
})
}