This project is currently under development.
Val Town should have a standard way to write tests. The idea behind this project is to create such a standard test framework for Val Town.
So far I have two prototypes:
Both are fine. Both have the tests as JSON (name, input, output). There are two differences:
expect from Deno's std libraryProbably expect is the right tool for the job.
The main issues with them are:
it and describe).
Maybe such a library could work here or maybe I could build it in this project.Also: would be neat if I could run tests in an interactive mode that would let me save the new "snapshots".
Jackson has an awesome prototype that includes a badge you can include in readmes, and it will rerun the tests whenever the badge is loaded: https://www.val.town/v/jxnblk/test