jest-matcher-utils
Advanced tools
Comparing version 19.1.0-alpha.eed82034 to 19.2.0-alpha.993e64af
@@ -14,9 +14,4 @@ /** | ||
const chalk = require('chalk'); | ||
const prettyFormat = require('pretty-format'); | ||
const AsymmetricMatcherPlugin = require('pretty-format/build/plugins/AsymmetricMatcher'); | ||
const ReactElementPlugin = require('pretty-format/build/plugins/ReactElement'); | ||
const ImmutablePlugins = require('pretty-format/build/plugins/ImmutablePlugins'); | ||
const prettyFormat = require('pretty-format');var _require$plugins = | ||
const PLUGINS = [AsymmetricMatcherPlugin, ReactElementPlugin].concat( | ||
ImmutablePlugins); | ||
@@ -26,3 +21,6 @@ | ||
require('pretty-format').plugins;const AsymmetricMatcher = _require$plugins.AsymmetricMatcher,ReactElement = _require$plugins.ReactElement,HTMLElement = _require$plugins.HTMLElement,Immutable = _require$plugins.Immutable; | ||
const PLUGINS = [AsymmetricMatcher, ReactElement, HTMLElement].concat( | ||
Immutable); | ||
@@ -39,2 +37,7 @@ | ||
const EXPECTED_COLOR = chalk.green; | ||
@@ -134,6 +137,8 @@ const EXPECTED_BG = chalk.bgGreen; | ||
const type = getType(received); | ||
return name + | ||
':' + ( | ||
type !== 'null' && type !== 'undefined' ? '\n ' + type + ': ' : ' ') + | ||
print(received); | ||
return ( | ||
name + | ||
':' + ( | ||
type !== 'null' && type !== 'undefined' ? '\n ' + type + ': ' : ' ') + | ||
print(received)); | ||
}; | ||
@@ -196,8 +201,10 @@ | ||
const isDirectExpectCall = options && options.isDirectExpectCall; | ||
return chalk.dim('expect' + (isDirectExpectCall ? '' : '(')) + | ||
RECEIVED_COLOR(received) + | ||
chalk.dim((isDirectExpectCall ? '' : ')') + matcherName + '(') + | ||
EXPECTED_COLOR(expected) + ( | ||
secondArgument ? `, ${EXPECTED_COLOR(secondArgument)}` : '') + | ||
chalk.dim(')'); | ||
return ( | ||
chalk.dim('expect' + (isDirectExpectCall ? '' : '(')) + | ||
RECEIVED_COLOR(received) + | ||
chalk.dim((isDirectExpectCall ? '' : ')') + matcherName + '(') + | ||
EXPECTED_COLOR(expected) + ( | ||
secondArgument ? `, ${EXPECTED_COLOR(secondArgument)}` : '') + | ||
chalk.dim(')')); | ||
}; | ||
@@ -204,0 +211,0 @@ |
{ | ||
"name": "jest-matcher-utils", | ||
"description": "A set of utility functions for jest-matchers and related packages", | ||
"version": "19.1.0-alpha.eed82034", | ||
"version": "19.2.0-alpha.993e64af", | ||
"repository": { | ||
@@ -11,6 +11,7 @@ "type": "git", | ||
"main": "build/index.js", | ||
"browser": "build-es5/index.js", | ||
"dependencies": { | ||
"chalk": "^1.1.3", | ||
"pretty-format": "^19.1.0-alpha.eed82034" | ||
"pretty-format": "^19.2.0-alpha.993e64af" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
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
12055
334
+ Addedpretty-format@19.2.0-alpha.993e64af(transitive)
- Removedpretty-format@19.1.0-alpha.eed82034(transitive)