Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jest-snapshot

Package Overview
Dependencies
Maintainers
5
Versions
280
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-snapshot - npm Package Compare versions

Comparing version 21.3.0-beta.1 to 21.3.0-beta.2

build/mock_serializer.js

18

build/index.js

@@ -18,7 +18,2 @@ 'use strict';

var _jestMatcherUtils = require('jest-matcher-utils');
var _State = require('./State');var _State2 = _interopRequireDefault(_State);

@@ -71,3 +66,5 @@ var _plugins = require('./plugins');

const result = snapshotState.match(
testName || currentTestName || '',
testName && currentTestName ?
`${currentTestName}: ${testName}` :
currentTestName || '',
received);const

@@ -120,3 +117,6 @@

const toThrowErrorMatchingSnapshot = function (received, expected) {
const toThrowErrorMatchingSnapshot = function (
received,
testName)
{
this.dontThrow && this.dontThrow();const

@@ -131,4 +131,2 @@ isNot = this.isNot;

(0, _jestMatcherUtils.ensureNoExpected)(expected, '.toThrowErrorMatchingSnapshot');
let error;

@@ -151,3 +149,3 @@

return toMatchSnapshot.call(this, error.message);
return toMatchSnapshot.call(this, error.message, testName);
};

@@ -154,0 +152,0 @@

@@ -12,13 +12,20 @@ 'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.getSerializers = exports.addSerializer = undefined;

var _prettyFormat = require('pretty-format');var _prettyFormat2 = _interopRequireDefault(_prettyFormat);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/var _prettyFormat$plugins = _prettyFormat2.default.plugins;const DOMElement = _prettyFormat$plugins.DOMElement,Immutable = _prettyFormat$plugins.Immutable,ReactElement = _prettyFormat$plugins.ReactElement,ReactTestComponent = _prettyFormat$plugins.ReactTestComponent;
var _prettyFormat = require('pretty-format');var _prettyFormat2 = _interopRequireDefault(_prettyFormat);
var _mock_serializer = require('./mock_serializer');var _mock_serializer2 = _interopRequireDefault(_mock_serializer);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}var _prettyFormat$plugins =
let PLUGINS = [ReactTestComponent, ReactElement, DOMElement, Immutable];
_prettyFormat2.default.plugins; /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/const DOMElement = _prettyFormat$plugins.DOMElement,Immutable = _prettyFormat$plugins.Immutable,ReactElement = _prettyFormat$plugins.ReactElement,ReactTestComponent = _prettyFormat$plugins.ReactTestComponent;let PLUGINS = [ReactTestComponent, ReactElement, DOMElement, Immutable, _mock_serializer2.default];
// Prepend to list so the last added is the first tested.

@@ -25,0 +32,0 @@ const addSerializer = exports.addSerializer = plugin => {

{
"name": "jest-snapshot",
"version": "21.3.0-beta.1",
"version": "21.3.0-beta.2",
"repository": {

@@ -12,8 +12,8 @@ "type": "git",

"chalk": "^2.0.1",
"jest-diff": "21.3.0-beta.1",
"jest-matcher-utils": "21.3.0-beta.1",
"jest-diff": "21.3.0-beta.2",
"jest-matcher-utils": "21.3.0-beta.2",
"mkdirp": "^0.5.1",
"natural-compare": "^1.4.0",
"pretty-format": "21.3.0-beta.1"
"pretty-format": "21.3.0-beta.2"
}
}
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