mirror of
https://github.com/Dvorinka/1356.git
synced 2026-06-04 12:02:56 +00:00
16 lines
480 B
Dart
16 lines
480 B
Dart
import 'dart:io';
|
|
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:hive/hive.dart';
|
|
import 'package:shared_preferences/shared_preferences.dart';
|
|
|
|
Future<void> testExecutable(dynamic Function() testMain) async {
|
|
TestWidgetsFlutterBinding.ensureInitialized();
|
|
SharedPreferences.setMockInitialValues({});
|
|
|
|
final hiveDir = await Directory.systemTemp.createTemp('lifetimer_test_hive_');
|
|
Hive.init(hiveDir.path);
|
|
|
|
await Future<void>.sync(() => testMain());
|
|
}
|