Socket
Socket
Sign inDemoInstall

spy4js

Package Overview
Dependencies
1
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.0 to 2.3.1

12

dist/spy.js

@@ -24,2 +24,3 @@ "use strict";

name: Symbol('__Spy_name__'),
snap: Symbol('__Spy_snap__'),
isSpy: Symbol('__Spy_isSpy__'),

@@ -33,3 +34,3 @@ func: Symbol('__Spy_func__'),

test: v => v && v[Symbols.isSpy],
print: spy => `Spy(${spy[Symbols.name]})`
print: spy => spy[Symbols.snap]
});

@@ -250,3 +251,3 @@ const DefaultSettings = {

class Spy {
constructor(name = 'the spy', __mock) {
constructor(name = '', __mock) {
const spy = function (...args) {

@@ -261,7 +262,10 @@ spy[Symbols.calls].push({

spy[Symbols.index] = registry.push(__mock.obj, __mock.methodName);
spy[Symbols.name] = `the spy on '${name}'`;
spy[Symbols.snap] = `Spy.on(${name})`;
} else {
spy[Symbols.index] = null;
spy[Symbols.name] = name || 'the spy';
spy[Symbols.snap] = `Spy(${name})`;
}
spy[Symbols.name] = name;
spy[Symbols.isSpy] = true;

@@ -305,3 +309,3 @@

__LOCK__ = false;
const spy = new Spy(`the spy on '${methodName}'`, {
const spy = new Spy(methodName, {
obj,

@@ -308,0 +312,0 @@ methodName

{
"name": "spy4js",
"version": "2.3.0",
"version": "2.3.1",
"description": "Smart, compact and powerful spy test framework",

@@ -5,0 +5,0 @@ "jest": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc