runWithConfiguration function
create a flutter_test_config.dart
and set testExecutable
funciont for add default config
Future<void> testExecutable(Future<void> Function() testMain) async {
return runWithConfiguration(testMain);
}
Implementation
Future<void> runWithConfiguration(Future<void> Function() testMain) async {
return GoldenToolkit.runWithConfiguration(
() async {
await loadAppFonts();
await testMain();
},
config: GoldenToolkitConfiguration(
skipGoldenAssertion: () => !Platform.isMacOS,
defaultDevices: const [Device.phone, Device.iphone11],
),
);
}