We could test the io-package against the current Schema, then we have our single point of truth in Schema and only need to test stuff which cannot be validated by the schema additionally
Extended test cases to test io-package.json against the schema https://github.com/ioBroker/ioBroker.js-controller/blob/master/schemas/io-package.json
This ensures that an error not addressed or detected in VSCode or a similar environment does not result in a release on GitHub and NPM.
It also prevents additional implementation effort for checks in the repochecker.
To implement this, we can use this package https://www.npmjs.com/package/jsonschema
|
describe(`Check contents of io-package.json`, () => { |
We could test the io-package against the current Schema, then we have our single point of truth in Schema and only need to test stuff which cannot be validated by the schema additionally
Extended test cases to test io-package.json against the schema https://github.com/ioBroker/ioBroker.js-controller/blob/master/schemas/io-package.json
This ensures that an error not addressed or detected in VSCode or a similar environment does not result in a release on GitHub and NPM.
It also prevents additional implementation effort for checks in the repochecker.
To implement this, we can use this package https://www.npmjs.com/package/jsonschema
testing/src/tests/packageFiles/index.ts
Line 135 in 764da3d