Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 1.0.3 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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc