| | |
| | | import type { Context } from 'vm'; |
| | | import type { LegacyFakeTimers, ModernFakeTimers } from '@jest/fake-timers'; |
| | | import type { Circus, Config, Global } from '@jest/types'; |
| | | import type { fn as JestMockFn, spyOn as JestMockSpyOn, ModuleMocker } from 'jest-mock'; |
| | | import type { fn as JestMockFn, mocked as JestMockMocked, spyOn as JestMockSpyOn, ModuleMocker } from 'jest-mock'; |
| | | export declare type EnvironmentContext = { |
| | | console: Console; |
| | | docblockPragmas: Record<string, string | Array<string>>; |
| | |
| | | * the top of the code block. Use this method if you want to explicitly avoid |
| | | * this behavior. |
| | | */ |
| | | doMock(moduleName: string, moduleFactory?: () => unknown): Jest; |
| | | doMock(moduleName: string, moduleFactory?: () => unknown, options?: { |
| | | virtual?: boolean; |
| | | }): Jest; |
| | | /** |
| | | * Indicates that the module system should never return a mocked version |
| | | * of the specified module from require() (e.g. that it should always return |
| | |
| | | * jest.spyOn; other mocks will require you to manually restore them. |
| | | */ |
| | | restoreAllMocks(): Jest; |
| | | mocked: typeof JestMockMocked; |
| | | /** |
| | | * Runs failed tests n-times until they pass or until the max number of |
| | | * retries is exhausted. This only works with `jest-circus`! |