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() {

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
});
});



+ 3
- 2
spec/manifest.json View File

@@ -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
}
}

Loading…
Cancel
Save