You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a difference between flutter test and very_good test when testing the Google Fonts
Steps To Reproduce
Create a test
voidmain() {
TestWidgetsFlutterBinding.ensureInitialized();
test('Example test to verify GoogleFonts', () {
final textStyle =GoogleFonts.lato();
expect(textStyle.fontFamily, 'Lato_regular');
});
}
Run flutter test
No errors
00:01 +1: All tests passed!
Run very_good test
Error occurs
Error: google_fonts was unable to load font Lato-Regular because the following exception occurred:
Exception: Failed to load font with url: https://fonts.gstatic.com/s/a/5ced1045820caaac87af3f61ded09bacc90881f158d04c59dcce436fd02ad368.ttf
Description
There is a difference between
flutter test
andvery_good test
when testing the Google FontsSteps To Reproduce
flutter test
very_good test
Expected Behavior
No errors with
very_good test
=)Additional Context
Using the recommended init tests for fonts
https://github.com/material-foundation/flutter-packages/blob/main/packages/google_fonts/example/test/unit_test.dart
The text was updated successfully, but these errors were encountered: