gg_golden library

Functions

callerPath(String stackTrace) String
Derives the goldens directory from a stack trace
expectGolden(String fileName, dynamic expected, {required bool updateGolden, bool updateGoldensEnabled = true}) Future<void>
Updates the golden file with the given content and compares it.
goldenDir([String? stackTrace]) Future<String>
Derives the goldens directory from a stack trace
projectRoot(String path, {int depth = 10}) Future<String>
Returns the root of the current project
updateGoldensFromEnv() bool
If this is set to true, the golden files will be updated.
writeBinaryGolden({required String fileName, required List<int> data}) Future<void>
Write golden file with binary data
writeGolden(String fileName, dynamic data, {bool writeAsBytes = false}) Future<void>
Write golden file with json compatible data types