forked from syntaxbullet/aurorabot
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:
@@ -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,
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -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: {
|
||||||
|
|||||||
Reference in New Issue
Block a user