From Dara Hayes:
I'm not 100% sure on how to approach this but there are a couple of things that need to be done 1. Assess the current data-sync-server tests to see which ones should be moved over 2. Convert those to typescript <- easier than you'd expect 3. Figure out how the test structure should wor For example - should we write the tests in Javascript or not? Does typescript force us to put the tests in a certain folder structure etc
Lastly, the test runner AVA mentions there is some ability to compile typescript on the fly. Can we take advantage of that somehow to make it generally less painful? https://github.com/avajs/ava/blob/master/docs/recipes/typescript.md @Wojciech Trocki might have other opinions but IMO it might be handy to continue using AVA just in terms of moving stuff over
You do not need to set up tests for all the things btw. It's more about figuring out how we're going to put testing in place just to establish a working pattern. Only requirement -> Make it easy
A good place to start might be the unit tests for hasRole and for KeycloakAuthContextProvider. These are pretty small unit test files that exist in the current sync server that are still completely applicable today but they will possibly need to be ported to TS |
|