Coalesce
Coalesce copied to clipboard
Create a testing framework for the code generation
Currently, the code generation has no tests against it other than "run the code generation against Coalesce.Web and Coalesce.Web.Vue and see if they still compile".
There are a few levels of completeness that we can strive for here:
- Level 0: Run the generators to ensure they don't throw exceptions.
- Level 1: Run the generators and then perform string-level verification for expected substrings in the output based on the input that was generated from.
- Level 2: Run generated code through the respective compiler (tsc or Roslyn) to ensure it compiles.
- Level 3: Actually run the code that gets generated to ensure it behaves correctly.
Each level more-or-less builds on the previous level, so it would make sense to start at the beginning and work forwards from there.