test: fix tests failing on windows

This commit is contained in:
Aleksey Kulikov 2021-10-29 10:59:30 +03:00 committed by GitHub
parent f4e17b124d
commit a71bb14b86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 26 additions and 34 deletions

View file

@ -1,3 +1,4 @@
import 'dart:ffi';
import 'dart:io';
import 'package:libgit2dart/libgit2dart.dart';
@ -30,11 +31,7 @@ void main() {
});
test('throws when trying to get odb and error occurs', () {
Directory('${repo.workdir}.git/objects/').deleteSync(recursive: true);
expect(
() => repo.odb,
throwsA(isA<LibGit2Error>()),
);
expect(() => Repository((nullptr)).odb, throwsA(isA<LibGit2Error>()));
});
test('successfully creates new odb with no backends', () {