File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
packages/jest-runtime/src Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -2159,6 +2159,16 @@ export default class Runtime {
2159
2159
this . _explicitShouldMock . set ( moduleID , false ) ;
2160
2160
return jestObject ;
2161
2161
} ;
2162
+ const unmockModule = ( moduleName : string ) => {
2163
+ const moduleID = this . _resolver . getModuleID (
2164
+ this . _virtualModuleMocks ,
2165
+ from ,
2166
+ moduleName ,
2167
+ { conditions : this . esmConditions } ,
2168
+ ) ;
2169
+ this . _explicitShouldMockModule . set ( moduleID , false ) ;
2170
+ return jestObject ;
2171
+ } ;
2162
2172
const deepUnmock = ( moduleName : string ) => {
2163
2173
const moduleID = this . _resolver . getModuleID (
2164
2174
this . _virtualMocks ,
@@ -2414,6 +2424,7 @@ export default class Runtime {
2414
2424
spyOn,
2415
2425
unmock,
2416
2426
unstable_mockModule : mockModule ,
2427
+ unstable_unmockModule : unmockModule ,
2417
2428
useFakeTimers,
2418
2429
useRealTimers,
2419
2430
} ;
You can’t perform that action at this time.
0 commit comments