Closed shaunlebron closed 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".
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.
published and documented here: https://github.com/shaunlebron/parinfer/tree/master/lib#test-api
I still need to:
parseOutput
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.
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.