测试:战斗测试
This commit is contained in:
@@ -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);
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user