parinfer / parinfer.js

Let's simplify the way we write Lisp
https://shaunlebron.github.io/parinfer
MIT License
1.76k stars 40 forks source link

Port test environment to other implementations? #139

Closed shaunlebron closed 7 years ago

shaunlebron commented 7 years ago

I changed the test environment to be more visual, but this has some implications on how we can test ports. We can get away with just generating JSON data with text/options as we did before. We can also go further and have something print out the result using test annotations to make it easier to read them.

oakmac commented 7 years ago

Yes - this is essential for the ports to maintain the same test coverage. The test cases should be in a portable format like JSON.

The custom markdown + test annotations is a neat system that is ultimately a distinct problem from Parinfer core logic. parinfer.js should not contain any "testing logic".

shaunlebron commented 7 years ago

I'll move the test stuff out of parinfer.js into a published test.js, so it can be used with:

require('parinfer/test');

I'll then have our test process generate the JSON data so the ports won't have to use it.

shaunlebron commented 7 years ago

published and documented here: https://github.com/shaunlebron/parinfer/tree/master/lib#test-api

I still need to:

shaunlebron commented 7 years ago

dumped all parsed test case data into the json files again. last thing I'll do is to run the tests using this data with the public API to verify.

shaunlebron commented 7 years ago

@oakmac all done here I think: