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.0.2 to 21.1.0

36

build/index.js

@@ -38,14 +38,20 @@ 'use strict';

const MOCK_CONSTRUCTOR_NAME = 'mockConstructor';
// $FlowFixMe
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/const RESERVED_KEYWORDS = Object.assign(Object.create(null), { arguments: true, await: true, break: true, case: true, catch: true, class: true, const: true, continue: true,
const MOCK_CONSTRUCTOR_NAME = 'mockConstructor'; /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/const FUNCTION_NAME_RESERVED_PATTERN = /[\s!-\/:-@\[-`{-~]/;const FUNCTION_NAME_RESERVED_REPLACE = new RegExp(FUNCTION_NAME_RESERVED_PATTERN.source, 'g'); // $FlowFixMe
const RESERVED_KEYWORDS = Object.assign(Object.create(null), {
arguments: true,
await: true,
break: true,
case: true,
catch: true,
class: true,
const: true,
continue: true,
debugger: true,

@@ -385,2 +391,3 @@ default: true,

this._mockState.delete(f);
return f;
};

@@ -391,2 +398,3 @@

this._mockConfigRegistry.delete(f);
return f;
};

@@ -480,4 +488,4 @@

// as part of it's name.
if (/[\s-]/.test(name)) {
name = name.replace(/[\s-]/g, '$');
if (FUNCTION_NAME_RESERVED_PATTERN.test(name)) {
name = name.replace(FUNCTION_NAME_RESERVED_REPLACE, '$');
}

@@ -484,0 +492,0 @@

{
"name": "jest-mock",
"version": "21.0.2",
"version": "21.1.0",
"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