From a08409cf4d3ba4fb58200af979282b87478e29db Mon Sep 17 00:00:00 2001 From: DaanV2 Date: Wed, 20 Jul 2022 21:41:42 +0200 Subject: [PATCH] Updated --- test/src/Validator.test.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/src/Validator.test.ts b/test/src/Validator.test.ts index 14dbe040..70a92e71 100644 --- a/test/src/Validator.test.ts +++ b/test/src/Validator.test.ts @@ -29,9 +29,14 @@ describe("Validate", function () { expect(object).to.not.be.null; }); - if (object) { + it("Check refs", function () { + if (!object) { + this.skip(); + return; + } + explore_refs(object, path.dirname(filepath)); - } + }); }); }); }); @@ -48,9 +53,7 @@ function explore_refs(data: JsonSchema, folder: string): void { if (!ref.startsWith("#")) { const filepath = path.isAbsolute(ref) ? ref : path.join(folder, ref); - it(`expecting ${ref} to exist from ${folder}`, function () { - expect(fs.existsSync(filepath), `ref ${ref} exists`).to.be.true; - }); + expect(fs.existsSync(filepath), `ref ${ref} exists`).to.be.true; } }