Files
ZYZ/game-server/test/CheckPatten.ts
liangtongchuan 3b4e906f37 测试:寻宝正常匹配的完整测试
FIXME:protobuf 中的 onItemUpdate 和测试有冲突
2021-02-10 19:19:29 +08:00

17 lines
459 B
TypeScript

import { expect } from 'chai';
export function checkSuccessResponse(response, withData = true) {
expect(response).to.be.an('object');
expect(response.code).equal(0);
if (withData) {
expect(response.data).to.be.an('object');
}
}
export function checkDisplayItems(items) {
expect(items).to.be.an('array');
items.forEach(item => {
expect(item.id).to.be.a('number');
expect(item.count).to.be.a('number');
})
}