Browse Source

fixed schema, test is a WIP

pull/79/merge
Jeremy Wentworth 7 years ago
parent
commit
5fec7f4209
2 changed files with 5 additions and 4 deletions
  1. +2
    -2
      spec/basic.tests.spec.js
  2. +3
    -2
      spec/manifest.json

+ 2
- 2
spec/basic.tests.spec.js View File

@@ -6,7 +6,7 @@ const validate = ajv.compile(require('./manifest.json'));


describe("json", function() { 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) { fs.readdir('plugins', function(err, files) {
if (err){ if (err){
fail("unable to read plugins dir"); fail("unable to read plugins dir");
@@ -47,12 +47,12 @@ describe("json", function() {
fail(`version '${obj.version}' must start with '${CUR_VER_PREFIX}'`); fail(`version '${obj.version}' must start with '${CUR_VER_PREFIX}'`);
} }


done();
} catch(err){ } catch(err){
fail(`Invalid JSON: ${filePath}\n${err}`); fail(`Invalid JSON: ${filePath}\n${err}`);
} }
}); });
} }
// done(); //TODO use promises
}); });
}); });




+ 3
- 2
spec/manifest.json View File

@@ -6,6 +6,7 @@
"version" "version"
], ],
"description": "A plugin manifest file for VCV Rack.", "description": "A plugin manifest file for VCV Rack.",
"additionalProperties": false,
"properties": { "properties": {
"slug": { "slug": {
"type": "string", "type": "string",
@@ -53,6 +54,7 @@
}, },
"downloads": { "downloads": {
"type": "object", "type": "object",
"additionalProperties": false,
"properties": { "properties": {
"win": { "win": {
"type": "object", "type": "object",
@@ -95,6 +97,5 @@
} }
} }
} }
},
"additionalProperties": false
}
} }

Loading…
Cancel
Save