test_gen library

The product: emit test/greenroom_test.g.dart — a SELF-CONTAINED test file proving every preview mounts. No runtime dependency on greenroom; flutter test is the runner and the gate.

Per mountable entry: one testWidgets honoring the annotation's own fields (size / textScaleFactor / brightness / wrapper), capturing failures with project-frame + creation-location attribution and a classified fix hint, and saving a PNG screenshot on success. Per obligation ('missing'): one failing test naming the widget. A tearDownAll writes .dart_tool/greenroom/verdicts.json.

Constants

testRelPath → const String

Functions

generateTestFile({required String packageName, required List<PreviewEntry> entries, required bool shell, required bool shots}) String
hasShellFor(String projectRoot) bool
runGen(String projectRoot, {required bool check, required bool shots}) Future<String>
Writes (or checks) the generated test. Returns a human summary line, or throws StateError in check mode when stale.