test: add deepMerge mock to fix test isolation
All checks were successful
Deploy to Production / test (push) Successful in 39s
All checks were successful
Deploy to Production / test (push) Successful in 39s
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.module("@shared/lib/utils", () => ({
|
||||
deepMerge: (target: any, source: any) => ({ ...target, ...source }),
|
||||
jsonReplacer: (key: string, value: any) =>
|
||||
typeof value === "bigint" ? value.toString() : value,
|
||||
}));
|
||||
|
||||
@@ -37,6 +37,13 @@ mock.module("@shared/lib/config", () => ({
|
||||
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
|
||||
const mockGuild = {
|
||||
roles: {
|
||||
|
||||
Reference in New Issue
Block a user