Socket
Socket
Sign inDemoInstall

jest-matcher-utils

Package Overview
Dependencies
0
Maintainers
3
Versions
229
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 13.3.0-alpha.g8b48d59 to 13.4.0-alpha.d2632006

38

build/index.js

@@ -78,4 +78,40 @@ /**

const ensureNoExpected = (expected, matcherName) => {
matcherName || (matcherName = 'This');
if (typeof expected !== 'undefined') {
throw new Error(`${ matcherName } matcher does not accept any arguments`);}};
const ensureActualIsNumber = (actual, matcherName) => {
matcherName || (matcherName = 'This matcher');
if (typeof actual !== 'number') {
throw new Error(
`${ matcherName } actual value should be a number. ` +
`'${ typeof actual }' was passed`);}};
const ensureExpectedIsNumber = (expected, matcherName) => {
matcherName || (matcherName = 'This matcher');
if (typeof expected !== 'number') {
throw new Error(
`${ matcherName } expected value should be a number. ` +
`'${ typeof expected }' was passed`);}};
const ensureNumbers = (actual, expected, matcherName) => {
ensureActualIsNumber(actual, matcherName);
ensureExpectedIsNumber(expected, matcherName);};
module.exports = {
getType,
stringify };
stringify,
ensureNoExpected,
ensureActualIsNumber,
ensureExpectedIsNumber,
ensureNumbers };

2

package.json
{
"name": "jest-matcher-utils",
"description": "A set of utility functions for jest-matchers and related packages",
"version": "13.3.0-alpha.g8b48d59",
"version": "13.4.0-alpha.d2632006",
"repository": {

@@ -6,0 +6,0 @@ "type": "git",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc