jest-create-mock-instance
Advanced tools
Comparing version 1.1.0 to 2.0.0
@@ -10,3 +10,9 @@ var jestMock = require("jest-mock"); | ||
function createMockInstance(cl) { | ||
var Mock = jestMock.generateFromMetadata(jestMock.getMetadata(cl)); | ||
var mocker = jestMock; | ||
// jest-mock 27 doesn't export an instance of ModuleMocker anymore. | ||
if (jestMock.ModuleMocker) { | ||
mocker = new jestMock.ModuleMocker(global); | ||
} | ||
var Mock = mocker.generateFromMetadata(mocker.getMetadata(cl)); | ||
return new Mock(); | ||
@@ -13,0 +19,0 @@ } |
{ | ||
"name": "jest-create-mock-instance", | ||
"version": "1.1.0", | ||
"version": "2.0.0", | ||
"description": "Create class mock instances easily with Jest", | ||
@@ -20,4 +20,4 @@ "main": "index.js", | ||
"devDependencies": { | ||
"jest": "^21.2.1" | ||
"jest": "^27.0.0" | ||
} | ||
} |
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
4787
24