Updated
This commit is contained in:
@@ -13,21 +13,12 @@ describe("test correct files", () => {
|
||||
if (file.endsWith(".json")) {
|
||||
const testfolder = file.replace(folder + "/", "");
|
||||
|
||||
it(testfolder, () => {
|
||||
let result = validator.ValidateFile(file);
|
||||
describe(testfolder, () => {
|
||||
const result = validator.ValidateFile(file);
|
||||
const schemas = validator.ls.getMatchingSchemas(result.doc, result.jdoc);
|
||||
|
||||
let schemas = validator.ls.getMatchingSchemas(result.doc, result.jdoc);
|
||||
|
||||
schemas.then(
|
||||
(success) => {
|
||||
expect(success.length, "Expected schemas to be returned").to.greaterThan(0);
|
||||
},
|
||||
(fail) => {
|
||||
expect.fail("failed on retrieving schemas");
|
||||
}
|
||||
);
|
||||
|
||||
result.promise.then(
|
||||
it("validation", () => {
|
||||
return result.promise.then(
|
||||
(succes) => {
|
||||
expect(succes.length, "Expected no errors got: " + JSON.stringify(succes)).to.equal(0);
|
||||
},
|
||||
@@ -35,6 +26,18 @@ describe("test correct files", () => {
|
||||
expect.fail("Failed to validate");
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
it("schemas", () => {
|
||||
return schemas.then(
|
||||
(success) => {
|
||||
expect(success.length, "Expected schemas to be returned").to.greaterThan(0);
|
||||
},
|
||||
(fail) => {
|
||||
expect.fail("failed on retrieving schemas");
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
return Promise.all([result.promise, schemas]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user