Files
TubeCards/test/flutter_test_config.dart
friebetill 80f218097d Initial commit
Add Space version 2.0.1
2022-03-28 14:56:00 +02:00

24 lines
754 B
Dart

import 'dart:async';
import 'dart:io';
import 'package:golden_toolkit/golden_toolkit.dart';
// Ensures fonts are properly displayed for golden tests.
//
// DO NOT MOVE to another file.
Future<void> testExecutable(FutureOr<void> Function() testMain) async {
return GoldenToolkit.runWithConfiguration(
() async {
await loadAppFonts();
await testMain();
},
config: GoldenToolkitConfiguration(
primeAssets: (_) async {},
// Since the Golden files are rendered slightly differently depending on
// the OS, the files must always be compared on the same OS. Since the
// automated tests run most cheapest on Linux, the tests are run on Linux.
skipGoldenAssertion: () => !Platform.isLinux,
),
);
}