Skip to content

Commit 15981e3

Browse files
authored
refactor: update to Dart 3 and Very Good Analysis 5 (#48)
1 parent 668e835 commit 15981e3

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: 0.3.0
44
homepage: https://github.com/VeryGoodOpenSource/pub_updater
55

66
environment:
7-
sdk: ">=2.12.0 <3.0.0"
7+
sdk: ">=3.0.0 <4.0.0"
88

99
dependencies:
1010
http: ^1.0.0
@@ -17,4 +17,4 @@ dev_dependencies:
1717
json_serializable: ^6.5.3
1818
mocktail: ^0.3.0
1919
test: ^1.17.0
20-
very_good_analysis: ^4.0.0
20+
very_good_analysis: ^5.0.0

test/pub_update_test.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ class MockResponse extends Mock implements Response {}
1515

1616
class MockProcessManager extends Mock implements ProcessManager {}
1717

18-
class FakeProcessResult extends Fake implements ProcessResult {}
19-
2018
const emptyResponseBody = '{}';
2119

2220
const command = [
@@ -59,7 +57,7 @@ void main() {
5957
when(() => response.body).thenReturn(validPackageInfoResponseBody);
6058

6159
when(() => processManager.run(any()))
62-
.thenAnswer((_) => Future.value(FakeProcessResult()));
60+
.thenAnswer((_) => Future.value(ProcessResult(42, 0, '', '')));
6361
});
6462

6563
test('can be instantiated without an explicit http client', () {
@@ -155,7 +153,7 @@ void main() {
155153
.thenReturn(preReleasePackageInfoResponseBody);
156154

157155
when(() => processManager.run(any()))
158-
.thenAnswer((_) => Future.value(FakeProcessResult()));
156+
.thenAnswer((_) => Future.value(ProcessResult(42, 0, '', '')));
159157
});
160158

161159
test('returns false when currentVersion < latestVersion', () async {

0 commit comments

Comments
 (0)