test: use setUp for tests instead of setUpAll

This commit is contained in:
Aleksey Kulikov 2021-08-07 19:00:14 +03:00
parent 2170965ad8
commit a474f06917
3 changed files with 12 additions and 50 deletions

View file

@ -14,7 +14,7 @@ void main() {
late Repository repo;
final tmpDir = '${Directory.systemTemp.path}/odb_testrepo/';
setUpAll(() async {
setUp(() async {
if (await Directory(tmpDir).exists()) {
await Directory(tmpDir).delete(recursive: true);
}
@ -25,7 +25,7 @@ void main() {
repo = Repository.open(tmpDir);
});
tearDownAll(() async {
tearDown(() async {
repo.free();
await Directory(tmpDir).delete(recursive: true);
});