jest-snapshot
Advanced tools
Comparing version 21.3.0-beta.1 to 21.3.0-beta.2
@@ -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" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7
426
23193
+ Addedjest-diff@21.3.0-beta.2(transitive)
+ Addedjest-get-type@21.3.0-beta.2(transitive)
+ Addedjest-matcher-utils@21.3.0-beta.2(transitive)
+ Addedpretty-format@21.3.0-beta.2(transitive)
- Removedjest-diff@21.3.0-beta.1(transitive)
- Removedjest-get-type@21.2.0(transitive)
- Removedjest-matcher-utils@21.3.0-beta.1(transitive)
- Removedpretty-format@21.3.0-beta.1(transitive)
Updatedjest-diff@21.3.0-beta.2
Updatedpretty-format@21.3.0-beta.2