docs(reference): update examples

This commit is contained in:
Aleksey Kulikov 2021-08-11 18:51:33 +03:00
parent 627519a31f
commit f5e43f3d90
2 changed files with 43 additions and 2 deletions

16
example/helpers.dart Normal file
View file

@ -0,0 +1,16 @@
import 'dart:io';
import '../test/helpers/util.dart';
Future<void> prepareRepo(String path) async {
if (await Directory(path).exists()) {
await Directory(path).delete(recursive: true);
}
await copyRepo(
from: Directory('test/assets/testrepo/'),
to: await Directory(path).create(),
);
}
Future<void> disposeRepo(String path) async {
await Directory(path).delete(recursive: true);
}