How to abstract tests to allow running different functions against the same test suite?
I've set up two suites of tests like this: https://github.com/gustwindjs/gustwind/tree/develop/htmlisp/html-tests, https://github.com/gustwindjs/gustwind/tree/develop/htmlisp/html-tests-sync . They are effectively the same but one is for async code and one for sync. Due to how the language works, technically it should be possible to use the async test suite for testing the sync code since
await just wraps sync result within a Promise. The question is, what would be a sane way to extract the shared tests and then inject the functions so I could end up with a single test suite against both async and sync functions?