jest-matcher-utils
Advanced tools
Comparing version 25.1.0 to 25.2.0-alpha.86
@@ -63,2 +63,6 @@ 'use strict'; | ||
if (!('set' in descriptor)) { | ||
descriptor.writable = true; | ||
} | ||
descriptor.configurable = true; | ||
@@ -65,0 +69,0 @@ }); |
@@ -47,3 +47,3 @@ /** | ||
export declare const printDiffOrStringify: (expected: unknown, received: unknown, expectedLabel: string, receivedLabel: string, expand: boolean) => string; | ||
export declare const diff: (a: any, b: any, options?: import("jest-diff/build/types").DiffOptions | undefined) => string | null; | ||
export declare const diff: (a: unknown, b: unknown, options?: ImportDiffOptions | undefined) => string | null; | ||
export declare const pluralize: (word: string, count: number) => string; | ||
@@ -50,0 +50,0 @@ declare type PrintLabel = (string: string) => string; |
@@ -25,3 +25,3 @@ 'use strict'; | ||
var cache = new WeakMap(); | ||
_getRequireWildcardCache = function() { | ||
_getRequireWildcardCache = function () { | ||
return cache; | ||
@@ -172,7 +172,3 @@ }; | ||
const printWithType = ( | ||
name, | ||
value, | ||
print // printExpected or printReceived | ||
) => { | ||
const printWithType = (name, value, print) => { | ||
const type = (0, _jestGetType.default)(value); | ||
@@ -542,7 +538,3 @@ const hasType = | ||
const matcherErrorMessage = ( | ||
hint, | ||
generic, | ||
specific // incorrect value returned from call to printWithType | ||
) => | ||
const matcherErrorMessage = (hint, generic, specific) => | ||
`${hint}\n\n${_chalk.default.bold('Matcher error')}: ${generic}${ | ||
@@ -549,0 +541,0 @@ typeof specific === 'string' ? '\n\n' + specific : '' |
@@ -30,2 +30,3 @@ 'use strict'; | ||
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ | ||
class Replaceable { | ||
@@ -56,2 +57,9 @@ constructor(object) { | ||
}); | ||
Object.getOwnPropertySymbols(this.object).forEach(key => { | ||
const descriptor = Object.getOwnPropertyDescriptor(this.object, key); | ||
if (descriptor.enumerable) { | ||
cb(this.object[key], key, this.object); | ||
} | ||
}); | ||
} else { | ||
@@ -78,3 +86,4 @@ this.object.forEach(cb); | ||
} | ||
/* eslint-enable */ | ||
exports.default = Replaceable; |
{ | ||
"name": "jest-matcher-utils", | ||
"description": "A set of utility functions for expect and related packages", | ||
"version": "25.1.0", | ||
"version": "25.2.0-alpha.86+cd98198c9", | ||
"repository": { | ||
@@ -15,12 +15,17 @@ "type": "git", | ||
"main": "build/index.js", | ||
"types": "build/index.d.ts", | ||
"dependencies": { | ||
"chalk": "^3.0.0", | ||
"jest-diff": "^25.1.0", | ||
"jest-get-type": "^25.1.0", | ||
"pretty-format": "^25.1.0" | ||
"jest-diff": "^25.2.0-alpha.86+cd98198c9", | ||
"jest-get-type": "^25.2.0-alpha.86+cd98198c9", | ||
"pretty-format": "^25.2.0-alpha.86+cd98198c9" | ||
}, | ||
"devDependencies": { | ||
"@jest/test-utils": "^25.2.0-alpha.86+cd98198c9", | ||
"@types/node": "*" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"gitHead": "170eee11d03b0ed5c60077982fdbc3bafd403638" | ||
"gitHead": "cd98198c9397d8b69c55155d7b224d62ef117a90" | ||
} |
Sorry, the diff of this file is not supported yet
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
30201
758
2
2
2