Socket
Socket
Sign inDemoInstall

jest-mock

Package Overview
Dependencies
Maintainers
5
Versions
238
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-mock - npm Package Compare versions

Comparing version 21.3.0-beta.4 to 21.3.0-beta.5

18

build/index.js

@@ -647,3 +647,3 @@ 'use strict';

isMockFunction(fn) {
return !!fn._isMockFunction;
return !!(fn && fn._isMockFunction);
}

@@ -661,2 +661,8 @@

spyOn(object, methodName) {
if (typeof object !== 'object' && typeof object !== 'function') {
throw new Error(
'Cannot spyOn on a primitive value; ' + this._typeOf(object) + ' given');
}
const original = object[methodName];

@@ -667,3 +673,7 @@

throw new Error(
'Cannot spyOn the ' + methodName + ' property; it is not a function');
'Cannot spy the ' +
methodName +
' property because it is not a function; ' +
this._typeOf(original) +
' given instead');

@@ -696,2 +706,6 @@ }

this._spyState = new Set();
}
_typeOf(value) {
return value == null ? '' + value : typeof value;
}}

@@ -698,0 +712,0 @@

2

package.json
{
"name": "jest-mock",
"version": "21.3.0-beta.4",
"version": "21.3.0-beta.5",
"repository": {

@@ -5,0 +5,0 @@ "type": "git",

Sorry, the diff of this file is too big to display

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