Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsft-vouch

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsft-vouch - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

12

lib/_tests/Vouch.test.js

@@ -41,7 +41,7 @@ 'use strict';

(0, _chai.expect)(err1).to.be.instanceof(Error);
(0, _chai.expect)(err1).to.have.keys(['summary', 'details', 'messages', 'propMessages']);
(0, _chai.expect)(err1).to.have.keys(['summary', 'detail', 'messages', 'propMessages']);
(0, _chai.expect)(err1.message).to.equal('Invalid Book');
(0, _chai.expect)(err1.status).to.be.undefined;
(0, _chai.expect)(err1.summary).to.equal('Missing required property: title at path "/", and 1 other validation error.');
(0, _chai.expect)(err1.details).to.equal('All validation errors: Missing required property: title at path "/". Additional properties not allowed at path "/foo".');
(0, _chai.expect)(err1.detail).to.equal('All validation errors: Missing required property: title at path "/". Additional properties not allowed at path "/foo".');
(0, _chai.expect)(err1.status).to.be.undefined;

@@ -52,6 +52,6 @@

(0, _chai.expect)(err2).to.be.instanceof(Error);
(0, _chai.expect)(err2).to.have.keys(['status', 'summary', 'details', 'messages', 'propMessages']);
(0, _chai.expect)(err2).to.have.keys(['status', 'summary', 'detail', 'messages', 'propMessages']);
(0, _chai.expect)(err2.message).to.equal('Wrong book.');
(0, _chai.expect)(err2.summary).to.equal('Missing required property: title at path "/", and 1 other validation error.');
(0, _chai.expect)(err2.details).to.equal('All validation errors: Missing required property: title at path "/". Additional properties not allowed at path "/foo".');
(0, _chai.expect)(err2.detail).to.equal('All validation errors: Missing required property: title at path "/". Additional properties not allowed at path "/foo".');
(0, _chai.expect)(err2.status).to.equal(418);

@@ -62,6 +62,6 @@

(0, _chai.expect)(err3).to.be.instanceof(Error);
(0, _chai.expect)(err3).to.have.keys(['summary', 'details', 'messages', 'propMessages']);
(0, _chai.expect)(err3).to.have.keys(['summary', 'detail', 'messages', 'propMessages']);
(0, _chai.expect)(err3.message).to.equal('Invalid book1.');
(0, _chai.expect)(err3.summary).to.equal('Additional properties not allowed at path "/author/something", and 6 other validation errors.');
(0, _chai.expect)(err3.details).to.equal('All validation errors: Additional properties not allowed at path "/author/something". Additional properties not allowed at path "/characters/0/yeah". Missing required property: name at path "/characters/1". Additional properties not allowed at path "/characters/1/blah". Data does not match any schemas from "oneOf" (Possible reasons: Missing required property: population / Additional properties not allowed / Missing required property: created / Additional properties not allowed) at path "/places/0". Data does not match any schemas from "oneOf" (Possible reasons: Missing required property: population / Additional properties not allowed / Missing required property: created / Additional properties not allowed) at path "/places/1". Additional properties not allowed at path "/foo".');
(0, _chai.expect)(err3.detail).to.equal('All validation errors: Additional properties not allowed at path "/author/something". Additional properties not allowed at path "/characters/0/yeah". Missing required property: name at path "/characters/1". Additional properties not allowed at path "/characters/1/blah". Data does not match any schemas from "oneOf" (Possible reasons: Missing required property: population / Additional properties not allowed / Missing required property: created / Additional properties not allowed) at path "/places/0". Data does not match any schemas from "oneOf" (Possible reasons: Missing required property: population / Additional properties not allowed / Missing required property: created / Additional properties not allowed) at path "/places/1". Additional properties not allowed at path "/foo".');
});

@@ -68,0 +68,0 @@ });

@@ -73,3 +73,3 @@ 'use strict';

err.details = (errors.length > 1 ? 'All validation errors: ' : '') + errors.map(_pathMessage).join('. ') + '.';
err.detail = (errors.length > 1 ? 'All validation errors: ' : '') + errors.map(_pathMessage).join('. ') + '.';

@@ -76,0 +76,0 @@ if (status) {

{
"name": "jsft-vouch",
"version": "0.5.0",
"version": "0.5.1",
"description": "Functional validation / assertion of objects with structures defined with json-schema.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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