mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Add a comment about how to test flutter_goldens (#141902)
This is part 2 of a broken down version of the #140101 refactor. This particular change wasn't in that original refactor but is a note to myself so that I remember how to test each of these changes in the future.
This commit is contained in:
parent
15ceca93a4
commit
5dc3b1894f
@ -746,6 +746,7 @@ void main() {
|
||||
expect(properties.properties.first.value, colorToPaint);
|
||||
});
|
||||
});
|
||||
|
||||
testWidgets('Inconsequential golden test', (WidgetTester tester) async {
|
||||
// The test validates the Flutter Gold integration. Any changes to the
|
||||
// golden file can be approved at any time.
|
||||
|
@ -18,6 +18,10 @@ export 'package:flutter_goldens_client/skia_client.dart';
|
||||
// repo itself, consider reading this wiki page:
|
||||
// https://github.com/flutter/flutter/wiki/Writing-a-golden-file-test-for-package%3Aflutter
|
||||
|
||||
// If you are trying to debug this package, you may like to use the golden test
|
||||
// titled "Inconsequential golden test" in this file:
|
||||
// /packages/flutter/test/widgets/basic_test.dart
|
||||
|
||||
const String _kFlutterRootKey = 'FLUTTER_ROOT';
|
||||
final RegExp _kMainBranch = RegExp(r'master|main');
|
||||
|
||||
@ -41,7 +45,6 @@ Future<void> testExecutable(FutureOr<void> Function() testMain, {String? namePre
|
||||
} else {
|
||||
goldenFileComparator = await FlutterLocalFileComparator.fromDefaultComparator(platform);
|
||||
}
|
||||
|
||||
await testMain();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user