🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

jest-create-mock-instance

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-create-mock-instance - npm Package Compare versions

Comparing version

to
1.1.0

11

index.d.ts
/**
* Create mock instance of given class or function constructor
*
*
* @param classConstructor Class constructor
* @returns New instance of given class constructor with all methods being mocked
*/
export function createMockInstance<T>(classConstructor: { new(...args: any[]): T } | { (): T }): jest.Mocked<T>;
/**
* Create mock instance of given class or function constructor
*
* @param classConstructor Class constructor
* @returns New instance of given class constructor with all methods being mocked
*/
export function createMockInstance<T>(classConstructor: Function): jest.Mocked<T>;
export function createMockInstance<T>(classConstructor: { new(...args: any[]): T } | { (...args: any[]): T }): jest.Mocked<T>;
export default createMockInstance;

2

package.json
{
"name": "jest-create-mock-instance",
"version": "1.0.3",
"version": "1.1.0",
"description": "Create class mock instances easily with Jest",

@@ -5,0 +5,0 @@ "main": "index.js",