fixed tests, null errors

This commit is contained in:
Deven Joshi
2021-04-12 18:44:30 +05:30
parent 686dcf27e6
commit 9ec4c83cfc
18 changed files with 124 additions and 106 deletions
+2 -2
View File
@@ -17,8 +17,8 @@ void main() {
final String pubspecPath = '${Directory.current.path}/pubspec.yaml';
final String pubspec = File(pubspecPath).readAsStringSync();
final RegExp regex = RegExp('version:\s*(.*)');
final RegExpMatch match = regex.firstMatch(pubspec);
final RegExpMatch? match = regex.firstMatch(pubspec);
expect(match, isNotNull);
expect(PACKAGE_VERSION, match.group(1).trim());
expect(PACKAGE_VERSION, match?.group(1)?.trim());
});
}