mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-24 07:23:24 +02:00
Fixed unit tests to not explode in dramatic fashion
This commit is contained in:
parent
88e8d64790
commit
55782e5dbc
@ -62,14 +62,14 @@ describe("Utils - Phase Interceptor - Unit", () => {
|
|||||||
*/
|
*/
|
||||||
function setPhases(...phases: [Constructor<mockPhase>, ...Constructor<mockPhase>[]]) {
|
function setPhases(...phases: [Constructor<mockPhase>, ...Constructor<mockPhase>[]]) {
|
||||||
game.scene.phaseManager.clearAllPhases();
|
game.scene.phaseManager.clearAllPhases();
|
||||||
game.scene.phaseManager.phaseQueue = phases.map(m => new m()) as Phase[];
|
for (const phase of phases) {
|
||||||
|
game.scene.phaseManager.unshiftPhase(new phase());
|
||||||
|
}
|
||||||
game.scene.phaseManager.shiftPhase(); // start the thing going
|
game.scene.phaseManager.shiftPhase(); // start the thing going
|
||||||
}
|
}
|
||||||
|
|
||||||
function getQueuedPhases(): string[] {
|
function getQueuedPhases(): string[] {
|
||||||
return game.scene.phaseManager["phaseQueuePrepend"]
|
return game.scene.phaseManager["phaseQueue"]["levels"].flat(2).map(p => p.phaseName);
|
||||||
.concat(game.scene.phaseManager.phaseQueue)
|
|
||||||
.map(p => p.phaseName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function expectAtPhase(phaseName: string) {
|
function expectAtPhase(phaseName: string) {
|
||||||
|
Loading…
Reference in New Issue
Block a user