summaryrefslogtreecommitdiff
path: root/web/test/fixtures.ts
diff options
context:
space:
mode:
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 {