File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import type {LegacyFakeTimers, ModernFakeTimers} from '@jest/fake-timers';
10
10
import type { Circus , Config , Global } from '@jest/types' ;
11
11
import type {
12
12
fn as JestMockFn ,
13
+ mocked as JestMockMocked ,
13
14
spyOn as JestMockSpyOn ,
14
15
ModuleMocker ,
15
16
} from 'jest-mock' ;
@@ -191,6 +192,7 @@ export interface Jest {
191
192
* jest.spyOn; other mocks will require you to manually restore them.
192
193
*/
193
194
restoreAllMocks ( ) : Jest ;
195
+ mocked : typeof JestMockMocked ;
194
196
/**
195
197
* Runs failed tests n-times until they pass or until the max number of
196
198
* retries is exhausted. This only works with `jest-circus`!
Original file line number Diff line number Diff line change @@ -1924,6 +1924,7 @@ export default class Runtime {
1924
1924
} ;
1925
1925
const fn = this . _moduleMocker . fn . bind ( this . _moduleMocker ) ;
1926
1926
const spyOn = this . _moduleMocker . spyOn . bind ( this . _moduleMocker ) ;
1927
+ const mocked = this . _moduleMocker . mocked . bind ( this . _moduleMocker ) ;
1927
1928
1928
1929
const setTimeout = ( timeout : number ) => {
1929
1930
if ( this . _environment . global . jasmine ) {
@@ -1975,6 +1976,7 @@ export default class Runtime {
1975
1976
isMockFunction : this . _moduleMocker . isMockFunction ,
1976
1977
isolateModules,
1977
1978
mock,
1979
+ mocked,
1978
1980
requireActual : this . requireActual . bind ( this , from ) ,
1979
1981
requireMock : this . requireMock . bind ( this , from ) ,
1980
1982
resetAllMocks,
You can’t perform that action at this time.
0 commit comments