rename package folders

This commit is contained in:
Salvatore Giordano
2021-02-01 15:45:58 +01:00
parent 6682ad5e8b
commit 964a428f2e
445 changed files with 1 additions and 343 deletions
@@ -0,0 +1,23 @@
import 'dart:io';
import 'package:test/test.dart';
import 'package:stream_chat/version.dart';
void prepareTest() {
// https://github.com/flutter/flutter/issues/20907
if (Directory.current.path.endsWith('/test')) {
Directory.current = Directory.current.parent;
}
}
void main() {
prepareTest();
test('stream chat version matches pubspec', () {
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);
expect(match, isNotNull);
expect(PACKAGE_VERSION, match.group(1).trim());
});
}