darklang / tablecloth

A standard library with the same API in F#, Rescript and OCaml
https://www.tablecloth.dev
MIT License
513 stars 45 forks source link

Create yaml file with test cases #307

Open pbiggar opened 2 years ago

pbiggar commented 2 years ago

Nearly every function can be tested via simple input/output. This means that instead of porting all the tests to each repo, we could put all the test data in a yaml file, and use that for tests.

We should pull the test data out of the tablecloth-rescript test files, as that is the most comprehensive at the moment.

We could also make that what we release: a list of functions that are expected and a list of test cases for them.

For implementations, we could write generators to generate test code from the yaml file.