jest-create-mock-instance
Advanced tools
Comparing version 1.0.3 to 1.1.0
/** | ||
* 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; |
{ | ||
"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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4600
19