New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jest-matcher-utils

Package Overview
Dependencies
Maintainers
3
Versions
233
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-matcher-utils - npm Package Compare versions

Comparing version 14.2.2-alpha.22bd3c33 to 14.3.0-alpha.d13c163e

34

build/index.js

@@ -13,4 +13,16 @@ /**

const chalk = require('chalk');
// get the type of a value with handling the edge cases like `typeof []`

@@ -34,2 +46,5 @@ // and `typeof null`

} else if (typeof value === 'object') {
if (value.constructor === RegExp) {
return 'regexp';
}
return 'object';

@@ -80,6 +95,9 @@ // $FlowFixMe https://github.com/facebook/flow/issues/1015

const highlight = object => chalk.red(stringify(object));
const printExpected = value => chalk.green(stringify(value));
const ensureNoExpected = (expected, matcherName) => {
matcherName || (matcherName = 'This');
if (typeof expected !== 'undefined') {
throw new Error(`${ matcherName } matcher does not accept any arguments`);
throw new Error(`${ matcherName } matcher does not accept any arguments.`);
}

@@ -93,3 +111,3 @@ };

`${ matcherName } actual value should be a number. ` +
`'${ typeof actual }' was passed`);
`'${ typeof actual }' was passed.`);

@@ -104,3 +122,3 @@ }

`${ matcherName } expected value should be a number. ` +
`'${ typeof expected }' was passed`);
`'${ typeof expected }' was passed.`);

@@ -116,7 +134,9 @@ }

module.exports = {
getType,
stringify,
ensureNoExpected,
ensureActualIsNumber,
ensureExpectedIsNumber,
ensureNumbers };
ensureNoExpected,
ensureNumbers,
getType,
highlight,
printExpected,
stringify };
{
"name": "jest-matcher-utils",
"description": "A set of utility functions for jest-matchers and related packages",
"version": "14.2.2-alpha.22bd3c33",
"version": "14.3.0-alpha.d13c163e",
"repository": {

@@ -13,3 +13,6 @@ "type": "git",

"test": "../../packages/jest-cli/bin/jest.js"
},
"dependencies": {
"chalk": "^1.1.3"
}
}
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