npm.io
3.0.0 • Published 1 year ago

@types/mock-require

Licence
MIT
Version
3.0.0
Deps
0
Size
3 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/mock-require

Summary

This package contains type definitions for mock-require (https://github.com/boblauer/mock-require).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mock-require.

index.d.ts

type StubFunction = (...params: any[]) => any;
type Stub = object | StubFunction;

interface Mock {
    (path: string, mockExport: string | Stub): void;
    stop(path: string): void;
    stopAll(): void;
    reRequire(path: string): any;
}

declare const mock: Mock;

export = mock;

Additional Details

  • Last updated: Sat, 19 Oct 2024 0351 GMT
  • Dependencies: none

Credits

These definitions were written by .