Skip to content

Commit 6586efb

Browse files
committed
feat: add onGenerateMock transformer callback (jestjs#15429)
1 parent f3888ef commit 6586efb

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

packages/jest-environment/src/index.ts

-12
Original file line numberDiff line numberDiff line change
@@ -207,18 +207,6 @@ export interface Jest {
207207
moduleFactory?: () => T,
208208
options?: {virtual?: boolean},
209209
): Jest;
210-
/**
211-
* Registers a callback function that is invoked whenever a mock is generated for a module.
212-
* This callback is passed the module name and the newly created mock object, and must return
213-
* the (potentially modified) mock object.
214-
*
215-
* If multiple callbacks are registered, they will be called in the order they were added.
216-
* Each callback receives the result of the previous callback as the `moduleMock` parameter,
217-
* making it possible to apply sequential transformations.
218-
*
219-
* @param cb
220-
*/
221-
onGenerateMock<T>(cb: (moduleName: string, moduleMock: T) => T): Jest;
222210
/**
223211
* Mocks a module with the provided module factory when it is being imported.
224212
*/

0 commit comments

Comments
 (0)