diff --git a/types/jest/index.d.ts b/types/jest/index.d.ts index 4b8de7cfa61e65..e8de7b51d55c32 100644 --- a/types/jest/index.d.ts +++ b/types/jest/index.d.ts @@ -72,23 +72,6 @@ type ExtractEachCallbackArgs> = { : 'fallback' ]; -interface NodeRequire { - /** - * Returns the actual module instead of a mock, bypassing all checks on - * whether the module should receive a mock implementation or not. - * - * @deprecated Use `jest.requireActual` instead. - */ - requireActual(moduleName: string): any; - /** - * Returns a mock module instead of the actual module, bypassing all checks - * on whether the module should be required normally or not. - * - * @deprecated Use `jest.requireMock`instead. - */ - requireMock(moduleName: string): any; -} - declare namespace jest { /** * Provides a way to add Jasmine-compatible matchers into your Jest context. diff --git a/types/jest/jest-tests.ts b/types/jest/jest-tests.ts index 47e5b1129b20ea..3079ee9d650b9c 100644 --- a/types/jest/jest-tests.ts +++ b/types/jest/jest-tests.ts @@ -228,16 +228,6 @@ describe('', () => { }); }); -/* NodeRequire interface (require extensions) */ - -declare const nodeRequire: NodeRequire; - -// $ExpectType any -nodeRequire.requireActual('moduleName'); - -// $ExpectType any -nodeRequire.requireMock('moduleName'); - /* Top-level jest namespace functions */ const customMatcherFactories: jasmine.CustomMatcherFactories = {};