Socket
Socket
Sign inDemoInstall

@vitest/spy

Package Overview
Dependencies
Maintainers
3
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vitest/spy - npm Package Compare versions

Comparing version 0.30.1 to 0.31.0

7

./dist/index.js

@@ -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": {

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