feat: codecov (#327)

* [llc] add codecov in gh action

* update flag

* update path

* fix codevcov script

* fix codevcov script

* [persistence]: add basic test

* [persistence] add codecov

* [persistence] vgv action

* update threashold

* fix ci

* add coverage for ui packages

* fix ci

* test gh action

* test gh action

* update threashold

* fix(persistence): fix tests

Signed-off-by: Sahil Kumar <[email protected]>

Co-authored-by: Sahil Kumar <[email protected]>
This commit is contained in:
Salvatore Giordano
2021-03-11 16:36:22 +01:00
committed by GitHub
co-authored by Sahil Kumar
parent 4b6f1f54b6
commit 39c2106497
9 changed files with 120 additions and 84 deletions
@@ -0,0 +1,27 @@
import 'package:stream_chat/stream_chat.dart';
import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
import 'package:stream_chat_persistence/src/stream_chat_persistence_client.dart';
import 'package:test/test.dart';
void main() {
group('connect', () {
test('throws exception because already connected', () {
final streamChatPersistenceClient = StreamChatPersistenceClient(
connectionMode: ConnectionMode.background,
logLevel: Level.INFO,
)..db = MoorChatDatabase(
'test',
persistOnDisk: false,
);
expect(
() => streamChatPersistenceClient.connect('test'),
throwsA(allOf(isException, predicate((e) {
return e.message ==
'An instance of StreamChatDatabase is already connected.\n'
'disconnect the previous instance before connecting again.';
}))),
);
});
});
}