diff --git a/packages/jest-environment/src/index.ts b/packages/jest-environment/src/index.ts index 892c99bd25f2..04a02ae10c0c 100644 --- a/packages/jest-environment/src/index.ts +++ b/packages/jest-environment/src/index.ts @@ -207,18 +207,6 @@ export interface Jest { moduleFactory?: () => T, options?: {virtual?: boolean}, ): Jest; - /** - * Registers a callback function that is invoked whenever a mock is generated for a module. - * This callback is passed the module name and the newly created mock object, and must return - * the (potentially modified) mock object. - * - * If multiple callbacks are registered, they will be called in the order they were added. - * Each callback receives the result of the previous callback as the `moduleMock` parameter, - * making it possible to apply sequential transformations. - * - * @param cb - */ - onGenerateMock(cb: (moduleName: string, moduleMock: T) => T): Jest; /** * Mocks a module with the provided module factory when it is being imported. */