mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-04 20:29:08 -04:00
feat(repository)!: add more aliases for api methods
BREAKING CHANGE: Make repository entry point for most operations
This commit is contained in:
parent
9205a3ad82
commit
3a0fa75929
51 changed files with 1380 additions and 1062 deletions
|
@ -6,17 +6,17 @@ void main() {
|
|||
late Repository repo;
|
||||
final initDir = Directory('${Directory.systemTemp.path}/init_repo');
|
||||
|
||||
setUp(() async {
|
||||
if (await initDir.exists()) {
|
||||
await initDir.delete(recursive: true);
|
||||
setUp(() {
|
||||
if (initDir.existsSync()) {
|
||||
initDir.deleteSync(recursive: true);
|
||||
} else {
|
||||
await initDir.create();
|
||||
initDir.createSync();
|
||||
}
|
||||
});
|
||||
|
||||
tearDown(() async {
|
||||
tearDown(() {
|
||||
repo.free();
|
||||
await initDir.delete(recursive: true);
|
||||
initDir.deleteSync(recursive: true);
|
||||
});
|
||||
group('Repository.init', () {
|
||||
test('successfully creates new bare repo at provided path', () {
|
||||
|
@ -49,7 +49,7 @@ void main() {
|
|||
File('${initDir.path}/.git/description').readAsStringSync(),
|
||||
'test repo',
|
||||
);
|
||||
expect(repo.remotes['origin'].url, 'test.url');
|
||||
expect(repo.lookupRemote('origin').url, 'test.url');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue