chore: apply linter to the various example and test directories (#550)
* chore: remove examples and tests from analysis exclusion * chore: apply linter fixes to stream_chat_flutter_core/example/main.dart * chore: apply linter fixes to stream_chat_flutter/example/main.dart * chore: apply linter fixes to stream_chat_persistence/example/main.dart * chore: apply linter fixes to stream_chat/example/main.dart * chore: apply linter fixes to stream_chat_flutter/example/split_view.dart * chore: renamte tutorial files per linter * chore: apply linter fixes to tutorial_part_1.dart * chore: apply linter fixes to tutorial_part_2.dart * chore: apply linter fixes to tutorial_part_3.dart * chore: apply linter fixes to tutorial_part_4.dart * chore: apply linter fixes to tutorial_part_5.dart * chore: make a widget const in tutorial_part_5.dart * chore: apply linter fixes to tutorial_part_6.dart * chore: sort and update dependencies in stream_chat_persistence/example/pubspec.yaml * chore: sort and update dependencies in stream_chat_flutter_core/example/pubspec.yaml * chore: sort and update dependencies in stream_chat_flutter/example/pubspec.yaml * chore: sort dependencies in stream_chat_flutter/example/pubspec.yaml * chore: apply linter fixes to channel_test.dart * chore: apply linter fixes to client_test.dart * chore: apply linter fixes to client_test.dart, stream_http_client_test.dart, and token_manager_test.dart * chore: apply linter fixes to filter_test.dart * chore: apply linter fixes to reaction_test.dart * chore: apply linter fixes to chat_persistence_client_test.dart * chore: apply linter fixes to channel_image_test.dart * chore: apply linter fixes to deleted_message_test.dart * chore: apply linter fixes to full_screen_media_test.dart * chore: apply linter fixes to gallery_footer_theme_test.dart * chore: apply linter fixes to gallery_header_theme_test.dart * chore: apply linter fixes to message_text_test.dart * chore: apply linter fixes to reaction_bubble_test.dart * chore: apply linter fixes to system_message_test.dart * chore: apply linter fixes to typing_indicator_test.dart * chore: apply linter fixes to channel_list_core_test.dart * chore: apply linter fixes to channels_bloc_test.dart * chore: apply linter fixes to lazy_load_scroll_view_test.dart * chore: apply linter fixes to channel_matcher.dart * chore: apply linter fixes to message_matcher.dart * chore: apply linter fixes to users_matcher.dart * chore: apply linter fixes to message_list_core_test.dart * chore: apply linter fixes to message_search_bloc_test.dart * chore: apply linter fixes to message_search_list_core_test.dart * chore: apply linter fixes to stream_channel_test.dart * chore: apply linter fixes to stream_chat_core_test.dart * chore: apply linter fixes to user_list_core_test.dart * chore: apply linter fixes to channel_query_dao_test.dart, message_mapper_test.dart, user_mapper_test.dart, and users_bloc_test.dart * chore: apply some missed dartfmt * test: regenerate failinggolden test
This commit is contained in:
@@ -555,7 +555,7 @@ void main() {
|
||||
});
|
||||
|
||||
test(
|
||||
'should directly update the state with message as deleted if the state is sending or failed',
|
||||
'''should directly update the state with message as deleted if the state is sending or failed''',
|
||||
() async {
|
||||
const messageId = 'test-message-id';
|
||||
final message = Message(
|
||||
@@ -981,7 +981,7 @@ void main() {
|
||||
);
|
||||
|
||||
test(
|
||||
'should override previous reaction if present and `enforceUnique` is true',
|
||||
'''should override previous reaction if present and `enforceUnique` is true''',
|
||||
() async {
|
||||
const userId = 'test-user-id';
|
||||
const messageId = 'test-message-id';
|
||||
@@ -1875,7 +1875,7 @@ void main() {
|
||||
});
|
||||
|
||||
test(
|
||||
'should send `typingStart` event if there is not already a typingEvent or the difference between the two is >= 2 seconds',
|
||||
'''should send `typingStart` event if there is not already a typingEvent or the difference between the two is >= 2 seconds''',
|
||||
() async {
|
||||
final typingEvent = Event(type: EventType.typingStart);
|
||||
|
||||
|
||||
@@ -47,12 +47,6 @@ void main() {
|
||||
final user = User(id: 'test-user-id');
|
||||
final token = Token.development(user.id).rawValue;
|
||||
|
||||
final event = Event(
|
||||
type: EventType.healthCheck,
|
||||
connectionId: 'fake-connection-id',
|
||||
me: OwnUser.fromUser(user),
|
||||
);
|
||||
|
||||
expectLater(
|
||||
// skipping first seed status -> ConnectionStatus.disconnected
|
||||
client.wsConnectionStatusStream.skip(1),
|
||||
@@ -74,12 +68,6 @@ void main() {
|
||||
return Token.development(userId).rawValue;
|
||||
}
|
||||
|
||||
final event = Event(
|
||||
type: EventType.healthCheck,
|
||||
connectionId: 'fake-connection-id',
|
||||
me: OwnUser.fromUser(user),
|
||||
);
|
||||
|
||||
expectLater(
|
||||
// skipping first seed status -> ConnectionStatus.disconnected
|
||||
client.wsConnectionStatusStream.skip(1),
|
||||
@@ -106,12 +94,6 @@ void main() {
|
||||
..accessToken = token,
|
||||
);
|
||||
|
||||
final event = Event(
|
||||
type: EventType.healthCheck,
|
||||
connectionId: 'fake-connection-id',
|
||||
me: OwnUser.fromUser(user),
|
||||
);
|
||||
|
||||
expectLater(
|
||||
// skipping first seed status -> ConnectionStatus.disconnected
|
||||
client.wsConnectionStatusStream.skip(1),
|
||||
@@ -431,7 +413,7 @@ void main() {
|
||||
});
|
||||
|
||||
test(
|
||||
'`.connectUser` should connect successfully if persistence contains event',
|
||||
'''`.connectUser` should connect successfully if persistence contains event''',
|
||||
() async {
|
||||
final user = User(id: 'test-user-id');
|
||||
final token = Token.development(user.id).rawValue;
|
||||
@@ -452,7 +434,7 @@ void main() {
|
||||
);
|
||||
|
||||
test(
|
||||
'`.connectUserWithProvider` should connect successfully if persistence contains event',
|
||||
'''`.connectUserWithProvider` should connect successfully if persistence contains event''',
|
||||
() async {
|
||||
final user = User(id: 'test-user-id');
|
||||
Future<String> tokenProvider(String userId) async {
|
||||
@@ -476,7 +458,7 @@ void main() {
|
||||
);
|
||||
|
||||
test(
|
||||
'`.connectGuestUser` should connect successfully if persistence contains event',
|
||||
'''`.connectGuestUser` should connect successfully if persistence contains event''',
|
||||
() async {
|
||||
final user = User(id: 'test-user-id');
|
||||
final token = Token.development(user.id).rawValue;
|
||||
@@ -507,7 +489,7 @@ void main() {
|
||||
);
|
||||
|
||||
test(
|
||||
'`.connectAnonymousUser` should connect successfully if persistence contains event',
|
||||
'''`.connectAnonymousUser` should connect successfully if persistence contains event''',
|
||||
() async {
|
||||
final user = User(id: 'test-user-id');
|
||||
|
||||
@@ -561,7 +543,7 @@ void main() {
|
||||
|
||||
group('`.sync`', () {
|
||||
test(
|
||||
'should update persistence connectionInfo and lastSync when sync succeeds',
|
||||
'''should update persistence connectionInfo and lastSync when sync succeeds''',
|
||||
() async {
|
||||
const cids = ['test-cid-1', 'test-cid-2', 'test-cid-3'];
|
||||
final lastSyncAt = DateTime.now();
|
||||
@@ -735,7 +717,7 @@ void main() {
|
||||
);
|
||||
|
||||
test(
|
||||
'should never rethrow network call if persistence already emitted some channels',
|
||||
'''should never rethrow network call if persistence already emitted some channels''',
|
||||
() async {
|
||||
final persistentChannelStates = List.generate(
|
||||
3,
|
||||
@@ -943,7 +925,7 @@ void main() {
|
||||
});
|
||||
|
||||
test(
|
||||
'should rethrow if `.queryChannelsOnline` throws and persistence channels are empty',
|
||||
'''should rethrow if `.queryChannelsOnline` throws and persistence channels are empty''',
|
||||
() async {
|
||||
when(() => api.channel.queryChannels(
|
||||
filter: any(named: 'filter'),
|
||||
|
||||
Reference in New Issue
Block a user