summaryrefslogtreecommitdiff
path: root/web/test/fixtures.ts
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2026-11-19 08:53:51 +0100
committerJoel Klinghed <the_jk@spawned.biz>2026-11-19 08:53:51 +0100
commitb884441ba0d10bdd3559748507a0991888f66194 (patch)
tree074321d353c1153e8d95191eecf5a61b2eec1096 /web/test/fixtures.ts
parentd64cf3514e5ff1ddb1c7f3ddac9a769db3e7dde0 (diff)
Phase 6: settings, saves, localization parity (M6)
Diffstat (limited to 'web/test/fixtures.ts')
-rw-r--r--web/test/fixtures.ts30
1 files changed, 29 insertions, 1 deletions
diff --git a/web/test/fixtures.ts b/web/test/fixtures.ts
index 805634e..94f402e 100644
--- a/web/test/fixtures.ts
+++ b/web/test/fixtures.ts
@@ -8,7 +8,8 @@ import type {
GameState,
LootDeck,
ModifierDeck,
- SanctuaryDeck
+ SanctuaryDeck,
+ SettingsPayload
} from '$lib/protocol/types';
import { LOOT_POOL_KEYS } from '$lib/protocol/types';
@@ -65,6 +66,33 @@ export function emptySanctuaryDeck(): SanctuaryDeck {
return { multPile: [], flipPile: [] };
}
+/**
+ * A server settings payload in its default shape (the server's
+ * `Settings.forClient()` defaults).
+ */
+export function emptySettings(
+ overrides: Partial<SettingsPayload> = {}
+): SettingsPayload {
+ return {
+ noInit: true,
+ noStandees: false,
+ randomStandees: false,
+ expireConditions: true,
+ autoAddStandees: true,
+ autoAddSpawns: true,
+ hideLootDeck: false,
+ style: 2,
+ showBattleGoalReminder: true,
+ showReminders: true,
+ showAmdDeck: true,
+ fhHazTerrainCalcInOGGloom: true,
+ locale: 'en',
+ saves: [],
+ characterSaves: [],
+ ...overrides
+ };
+}
+
export function emptyGameState(
overrides: Partial<GameState> = {}
): GameState {