mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-04 20:29:08 -04:00
test: remove checks for messages of throws
Platform specific messages for throws is different, so checking that test throws proper type should be enough
This commit is contained in:
parent
8791527ad9
commit
7f0cd86e72
35 changed files with 171 additions and 1331 deletions
|
@ -94,26 +94,14 @@ void main() {
|
|||
name: '',
|
||||
path: worktreeDir.path,
|
||||
),
|
||||
throwsA(
|
||||
isA<LibGit2Error>().having(
|
||||
(e) => e.toString(),
|
||||
'error',
|
||||
contains('failed to make directory'),
|
||||
),
|
||||
),
|
||||
throwsA(isA<LibGit2Error>()),
|
||||
);
|
||||
expect(
|
||||
() => repo.createWorktree(
|
||||
name: 'name',
|
||||
path: '',
|
||||
),
|
||||
throwsA(
|
||||
isA<LibGit2Error>().having(
|
||||
(e) => e.toString(),
|
||||
'error',
|
||||
'attempt to create empty path: Invalid argument',
|
||||
),
|
||||
),
|
||||
throwsA(isA<LibGit2Error>()),
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -135,13 +123,7 @@ void main() {
|
|||
test('throws when trying to lookup and error occurs', () {
|
||||
expect(
|
||||
() => Worktree.lookup(repo: Repository(nullptr), name: 'name'),
|
||||
throwsA(
|
||||
isA<LibGit2Error>().having(
|
||||
(e) => e.toString(),
|
||||
'error',
|
||||
"invalid argument: 'repo'",
|
||||
),
|
||||
),
|
||||
throwsA(isA<LibGit2Error>()),
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -185,13 +167,7 @@ void main() {
|
|||
test('throws when trying get list of worktrees and error occurs', () {
|
||||
expect(
|
||||
() => Worktree.list(Repository(nullptr)),
|
||||
throwsA(
|
||||
isA<LibGit2Error>().having(
|
||||
(e) => e.toString(),
|
||||
'error',
|
||||
"invalid argument: 'repo'",
|
||||
),
|
||||
),
|
||||
throwsA(isA<LibGit2Error>()),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue