The co-op integration test picks a band the AI has not taken and waits for b.start (#146)
Fixes the flaky CI run reported in #144: a fixed seed, a free band from the public draft with the pick asserted, and the battle start awaited. Closes #144. Contributed by @CELLOPOI.
This commit is contained in:
1 parent
85b91b9013
commit
098b8f09b1
2 files changed
+28
-16
No files matched your search
@@ -750,6 +750,8 @@ round was over. The official 1 s `broadcastBeginDelay` is not modelled.
|
||||
|
||||
## 6. Testing & tools
|
||||
|
||||
* `test/match/lobby-integration.test.js` 的联机轮选使用固定种子 `69`,覆盖 AI 先选走默认策略的情况(GitHub #144)。模拟玩家从当前公开选牌结果中选择未被占用的策略,并断言请求成功;不依赖拒绝后的超时分配。单人和联机用例均通过 `b.start` 确认战斗开始,避免瞬间结束的模拟战斗被公开状态节流而漏掉 `COMBAT` 阶段。
|
||||
|
||||
* `test/match/fakeBattle.js` — scriptable DESIGN §5.1 Battle (`FakeBattle.script = (battle) => plan`); inject with
|
||||
`new Match({ …, BattleClass: FakeBattle })`.
|
||||
* `test/match/harness.js` — `makeMatch(opts)` (virtual scheduler, captured frames, `drive()` for human decisions,
|
||||
|
||||
Reference in new issue
Block a user