Skip to content

Commit 31b2e96

Browse files
authored
Add test case that we are using the latest flutter version (dart-lang#3656)
1 parent ad11ea8 commit 31b2e96

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

app/test/shared/versions_test.dart

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,26 @@ void main() {
9090
isTrue);
9191
});
9292

93+
test(
94+
'Flutter is using the latest stable',
95+
() async {
96+
final flutterArchive = await fetchFlutterArchive();
97+
final currentStable = flutterArchive.releases.firstWhere(
98+
(r) => r.hash == flutterArchive.currentRelease.stable,
99+
orElse: () => null,
100+
);
101+
assert(currentStable != null, 'Expected current stable to exist');
102+
expect(
103+
flutterVersion,
104+
equals(currentStable.version),
105+
reason: '''Expected flutterVersion to be current stable
106+
Please update flutterVersion in app/lib/shared/versions.dart
107+
and do not format to also bump the runtimeVersion.''',
108+
);
109+
},
110+
skip: false, // Note: this test is easily skipped.
111+
);
112+
93113
test('dartdoc version should match pkg/pub_dartdoc', () async {
94114
final yamlContent =
95115
await File('../pkg/pub_dartdoc/pubspec.yaml').readAsString();

0 commit comments

Comments
 (0)