railtoolkit / schema

This repo collects the descriptions of the structure and the validation constraints of tools in the railtoolkit in JSON schemas. It is, therefore, an alternative to RailML.
ISC License
1 stars 0 forks source link

Make tests executable locally and add helper script #20

Closed gwehrle closed 2 months ago

gwehrle commented 2 months ago

I moved the the tests into a package.json. You now can run npm test to run all tests locally. All dependencies are defined in the package.json and don't have to be listed manually in the Readme. Additionally I added a helper script for convenience.

Before:

  $ ajv --spec=draft2020 -c ajv-formats -s src/rolling-stock.json -d doc/rolling-stock.example.yaml

After:

  $ npm run validate:rolling-stock doc/rolling-stock.example.yaml