From 5fec7f4209b25ee7e8ee06d3bd8ba7923cdeddfd Mon Sep 17 00:00:00 2001 From: Jeremy Wentworth Date: Thu, 21 Dec 2017 06:39:16 -0500 Subject: [PATCH] fixed schema, test is a WIP --- spec/basic.tests.spec.js | 4 ++-- spec/manifest.json | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/spec/basic.tests.spec.js b/spec/basic.tests.spec.js index 702464f8..64a796d4 100644 --- a/spec/basic.tests.spec.js +++ b/spec/basic.tests.spec.js @@ -6,7 +6,7 @@ const validate = ajv.compile(require('./manifest.json')); describe("json", function() { - it("manifest files should be valid against the schema", function(done) { + it("manifest files should be valid against the schema", function(/*done*/) {//TODO fix fs.readdir('plugins', function(err, files) { if (err){ fail("unable to read plugins dir"); @@ -47,12 +47,12 @@ describe("json", function() { fail(`version '${obj.version}' must start with '${CUR_VER_PREFIX}'`); } - done(); } catch(err){ fail(`Invalid JSON: ${filePath}\n${err}`); } }); } + // done(); //TODO use promises }); }); diff --git a/spec/manifest.json b/spec/manifest.json index c80165bf..c1ef1786 100644 --- a/spec/manifest.json +++ b/spec/manifest.json @@ -6,6 +6,7 @@ "version" ], "description": "A plugin manifest file for VCV Rack.", + "additionalProperties": false, "properties": { "slug": { "type": "string", @@ -53,6 +54,7 @@ }, "downloads": { "type": "object", + "additionalProperties": false, "properties": { "win": { "type": "object", @@ -95,6 +97,5 @@ } } } - }, - "additionalProperties": false + } } \ No newline at end of file