Closed shaunlebron closed 2 years ago
@oakmac is also envisioning an interactive page for creating/modifying test cases and seeing results live. and possibly pushing that page to the public website
It was pretty painful adding manual test cases for certain options. I think allowing a preceding "js" block before the "in" block might be simplest for now.
I added support for an options line at the start of the input block— enforcing an empty line afterward so it’s clearly separated from the actual input text.
options = { commentChars: '#' }
(def foo #)
I think we can do something similar for the output block if we want to verify some part of the returned structure. For example, I never added tests for the returned parens
when the returnParens
option is enabled. I’ll create a new issue for that.
It's becoming a problem that I cannot test certain options using annotation syntax.
@oakmac recommends splitting tests into their own files
This may benefit from "snapshot testing", where the test runner will allow us to confirm the changed output or result structure so that it writes back to the file instead of failing the test suite.
The test runner can also print annotated forms of the data back into the file for readability: