jest-schema-matcher
Advanced tools
Comparing version 1.3.1 to 1.4.0
@@ -8,3 +8,3 @@ "use strict"; | ||
const jest_matcher_utils_1 = require("jest-matcher-utils"); | ||
const schematized_1 = require("schematized"); | ||
const schematized_1 = __importDefault(require("schematized")); | ||
const chalk_1 = __importDefault(require("chalk")); | ||
@@ -121,3 +121,3 @@ const variable_diff_1 = __importDefault(require("variable-diff")); | ||
function generateSchema(_schemaName, object, schema = {}) { | ||
const schemaBuilder = new schematized_1.SchemaBuilder(); | ||
const schemaBuilder = new schematized_1.default(); | ||
if (schema) { | ||
@@ -146,3 +146,3 @@ schemaBuilder.addSchema(schema); | ||
const rejectedValue = pretty_format_1.default(eval(`_object${error.dataPath}`)); | ||
const violationDetails = error.params; | ||
const expectedDetails = error.params; | ||
return (chalk_1.default.bold.yellow(error.keyword.toUpperCase()) + | ||
@@ -155,5 +155,5 @@ ' violation: ' + | ||
'\n\n' + | ||
(violationDetails ? | ||
'Violations details: ' + | ||
chalk_1.default.red(pretty_format_1.default(violationDetails)) + | ||
(expectedDetails ? | ||
'Expected: ' + | ||
chalk_1.default.red(pretty_format_1.default(expectedDetails)) + | ||
'\n\n' : | ||
@@ -160,0 +160,0 @@ '') + |
{ | ||
"name": "jest-schema-matcher", | ||
"version": "1.3.1", | ||
"version": "1.4.0", | ||
"license": "MIT", | ||
@@ -34,2 +34,5 @@ "files": [ | ||
}, | ||
"engines": { | ||
"node": ">= 12.x" | ||
}, | ||
"dependencies": { | ||
@@ -40,3 +43,3 @@ "ajv": "^6.12.2", | ||
"pretty-format": "^26.1.0", | ||
"schematized": "^1.5.1", | ||
"schematized": "^1.7.0", | ||
"variable-diff": "^2.0.1" | ||
@@ -56,3 +59,3 @@ }, | ||
"ts-jest": "^26.1.1", | ||
"typescript": "^3.9.5", | ||
"typescript": "^3.9.6", | ||
"xo": "^0.32.0" | ||
@@ -59,0 +62,0 @@ }, |
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
14836
Updatedschematized@^1.7.0