source_gen_test
source_gen_test copied to clipboard
Test if the generated code matches a file
I have large pieces of code generated. Testing for them using ShouldGenerate
with the inline content makes it hard to read and update. Also I would like to write separate tests for the generated code. For these reasons I want to store the expected code in separate files.
This could be made with a new annotation like
@ShouldGenerateGolden('file.dart')
...
Or is there already an option to do something similar?