diff --git a/src/common/test-utils/get-global-override-for-function.ts b/src/common/test-utils/get-global-override-for-function.ts index 238ee5621a..63013adcde 100644 --- a/src/common/test-utils/get-global-override-for-function.ts +++ b/src/common/test-utils/get-global-override-for-function.ts @@ -9,10 +9,16 @@ import { camelCase } from "lodash/fp"; export const getGlobalOverrideForFunction = ( injectable: Injectable, ) => - getGlobalOverride(injectable, () => (...args: any[]) => { + getGlobalOverride(injectable, (di) => (...args: any[]) => { console.warn( - `Tried to invoke a function "${injectable.id}" without override. The args were:`, + `Tried to invoke a function "${injectable.id}" without override.`, + "\n\n", + "The args were:", args, + "\n\n", + `The context was: "${di.context + .map((x) => x.injectable.id) + .join(" -> ")}"`, ); throw new Error(