@aml-org/amf-custom-validator
Advanced tools
Comparing version 0.1.0-SNAPSHOT.35 to 0.1.0-SNAPSHOT.36
{ | ||
"name": "@aml-org/amf-custom-validator", | ||
"version": "0.1.0-SNAPSHOT.35", | ||
"version": "0.1.0-SNAPSHOT.36", | ||
"description": "AMF validator backed by OPA Rego", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -7,2 +7,7 @@ const fs = require("fs"); | ||
describe('validate', () => { | ||
function invalidReport(report) { | ||
return report[0]["doc:encodes"][0]["conforms"] === false | ||
} | ||
it("should load the WASM code, validate a profile, exit", (done) => { | ||
@@ -20,3 +25,3 @@ const profile = fs.readFileSync(__dirname + "/../../../test/data/integration/profile10/profile.yaml").toString() | ||
let report = JSON.parse(r) | ||
assert.ok(report["conforms"] === false) | ||
assert.ok(invalidReport(report)) | ||
validator.validate(profile, data, false, (r, err) => { | ||
@@ -27,3 +32,3 @@ if (err) { | ||
let report = JSON.parse(r) | ||
assert.ok(report["conforms"] === false) | ||
assert.ok(invalidReport(report)) | ||
validator.exit(); | ||
@@ -30,0 +35,0 @@ done(); |
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
4994712
623