getsentry / json-schema-diff

Diff changes between JSON schemas
https://docs.rs/json-schema-diff/
15 stars 2 forks source link

Split up testsuite into multiple files. #21

Closed untitaker closed 1 year ago

untitaker commented 1 year ago

The testsuite in src/lib.rs is starting to approach an unmanageable size. We should move it to be integration tests at the very least, and split up testcases into multiple files. For example, all tests for anyOf should go in one folder/file.

I think we should also consider making it so that testcases are programmatically generated from a folder of JSON files. Since there is then no arbitrary code per-test, it will make it easier to perform mass-edits on those JSON files. In the long run it also avoids a potential problem where large amount of testcases impacts compilation speed.

The options I know of are listed here: https://github.com/untitaker/script-macro/blob/main/README.md#other-cool-projects -- libtest-mimic and test-generator are the ones that I think are sanest.

untitaker commented 1 year ago

closed via #24