File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -507,6 +507,13 @@ class FlutterLocalFileComparator extends FlutterGoldenFileComparator with LocalC
507507 'SocketException occurred, could not reach Gold. '
508508 'Switching to FlutterSkippingGoldenFileComparator.' ,
509509 );
510+ } on FormatException catch (_) {
511+ return FlutterSkippingFileComparator (
512+ baseDirectory.uri,
513+ goldens,
514+ 'FormatException occurred, could not reach Gold. '
515+ 'Switching to FlutterSkippingGoldenFileComparator.' ,
516+ );
510517 }
511518
512519 return FlutterLocalFileComparator (baseDirectory.uri, goldens);
Original file line number Diff line number Diff line change @@ -1160,6 +1160,16 @@ void main() {
11601160 baseDirectory: fakeDirectory,
11611161 );
11621162 expect (comparator.runtimeType, FlutterSkippingFileComparator );
1163+
1164+ fakeSkiaClient.getExpectationForTestThrowable = const FormatException ("Can't reach Gold" );
1165+
1166+ comparator = await FlutterLocalFileComparator .fromDefaultComparator (
1167+ platform,
1168+ goldens: fakeSkiaClient,
1169+ baseDirectory: fakeDirectory,
1170+ );
1171+ expect (comparator.runtimeType, FlutterSkippingFileComparator );
1172+
11631173 // reset property or it will carry on to other tests
11641174 fakeSkiaClient.getExpectationForTestThrowable = null ;
11651175 });
You can’t perform that action at this time.
0 commit comments