test: add deepMerge mock to fix test isolation

Add deepMerge to @shared/lib/utils mocks in both test files to ensure
consistent behavior when tests run together.
This commit is contained in:
syntaxbullet
2026-02-08 16:42:02 +01:00
parent 20284dc57b
commit fbf1e52c28
2 changed files with 8 additions and 0 deletions

View File

@@ -127,6 +127,7 @@ mock.module("@shared/modules/items/items.service", () => ({
// --- Mock Utilities --- // --- Mock Utilities ---
mock.module("@shared/lib/utils", () => ({ mock.module("@shared/lib/utils", () => ({
deepMerge: (target: any, source: any) => ({ ...target, ...source }),
jsonReplacer: (key: string, value: any) => jsonReplacer: (key: string, value: any) =>
typeof value === "bigint" ? value.toString() : value, typeof value === "bigint" ? value.toString() : value,
})); }));

View File

@@ -37,6 +37,13 @@ mock.module("@shared/lib/config", () => ({
GameConfigType: {} GameConfigType: {}
})); }));
// Mock @shared/lib/utils (deepMerge is used by settings API)
mock.module("@shared/lib/utils", () => ({
deepMerge: (target: any, source: any) => ({ ...target, ...source }),
jsonReplacer: (key: string, value: any) =>
typeof value === "bigint" ? value.toString() : value,
}));
// Mock BotClient // Mock BotClient
const mockGuild = { const mockGuild = {
roles: { roles: {