@vitest/spy
Advanced tools
Comparing version 0.30.1 to 0.31.0
@@ -119,6 +119,9 @@ import * as tinyspy from 'tinyspy'; | ||
function fn(implementation) { | ||
return enhanceSpy(tinyspy.internalSpyOn({ fn: implementation || (() => { | ||
}) }, "fn")); | ||
const enhancedSpy = enhanceSpy(tinyspy.internalSpyOn({ spy: () => { | ||
} }, "spy")); | ||
if (implementation) | ||
enhancedSpy.mockImplementation(implementation); | ||
return enhancedSpy; | ||
} | ||
export { fn, isMockFunction, spies, spyOn }; |
@@ -119,6 +119,9 @@ import * as tinyspy from 'tinyspy'; | ||
function fn(implementation) { | ||
return enhanceSpy(tinyspy.internalSpyOn({ fn: implementation || (() => { | ||
}) }, "fn")); | ||
const enhancedSpy = enhanceSpy(tinyspy.internalSpyOn({ spy: () => { | ||
} }, "spy")); | ||
if (implementation) | ||
enhancedSpy.mockImplementation(implementation); | ||
return enhancedSpy; | ||
} | ||
export { fn, isMockFunction, spies, spyOn }; |
{ | ||
"name": "@vitest/spy", | ||
"type": "module", | ||
"version": "0.30.1", | ||
"version": "0.31.0", | ||
"description": "Lightweight Jest compatible spy implementation", | ||
"license": "MIT", | ||
"funding": "https://opencollective.com/vitest", | ||
"homepage": "https://github.com/vitest-dev/vitest/tree/main/packages/spy#readme", | ||
"repository": { | ||
@@ -12,2 +14,5 @@ "type": "git", | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/vitest-dev/vitest/issues" | ||
}, | ||
"sideEffects": false, | ||
@@ -14,0 +19,0 @@ "exports": { |
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
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
15057
354
1
1