From d58ab690ef3a3b419f62483ccb32d736db11ccd6 Mon Sep 17 00:00:00 2001 From: Sreelal TS Date: Thu, 21 Dec 2023 18:21:40 +0530 Subject: [PATCH 1/3] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20Exports=20`HttpClientE?= =?UTF-8?q?xception`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/teledart.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/teledart.dart b/lib/teledart.dart index f8633989..f1aaf3c0 100644 --- a/lib/teledart.dart +++ b/lib/teledart.dart @@ -31,3 +31,4 @@ export 'src/teledart/event/event.dart'; export 'src/teledart/fetch/abstract_update_fetcher.dart'; export 'src/teledart/fetch/long_polling.dart'; export 'src/teledart/fetch/webhook.dart'; +export 'src/util/http_client.dart' show HttpClientException; From 4b8d4c2ad71331ee0f3f0a69f9327c2272673657 Mon Sep 17 00:00:00 2001 From: Sreelal TS Date: Thu, 21 Dec 2023 18:30:01 +0530 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=9A=A7=20Deleted=20test=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/TeleDart_test.dart | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 test/TeleDart_test.dart diff --git a/test/TeleDart_test.dart b/test/TeleDart_test.dart deleted file mode 100644 index 71a9f599..00000000 --- a/test/TeleDart_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// import 'package:teledart/teledart.dart'; -import 'package:test/test.dart'; - -void main() { - group('A group of tests', () { - setUp(() {}); - - test('First Test', () { - // TODO: TEST ME PLEASE - }); - }); -} From 1427289bb7fb7e077df0d72fae4c2c85b6bb47f1 Mon Sep 17 00:00:00 2001 From: Sreelal TS Date: Thu, 21 Dec 2023 18:31:15 +0530 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=9A=9A=20Rename=20&=20added=20one=20t?= =?UTF-8?q?est?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/teledart_test.dart | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/teledart_test.dart diff --git a/test/teledart_test.dart b/test/teledart_test.dart new file mode 100644 index 00000000..8e1904cf --- /dev/null +++ b/test/teledart_test.dart @@ -0,0 +1,22 @@ +import 'dart:io'; + +import 'package:teledart/teledart.dart'; +import 'package:test/test.dart'; + +void main() { + TeleDart teleDart = TeleDart( + Platform.environment["BOT_TOKEN"]!, + Event(Platform.environment["BOT_USERNAME"] ?? ""), + ); + group('Senders', () { + setUp(() {}); + + test('sendMessage', () async { + final msg = await teleDart.sendMessage( + Platform.environment["CHAT_ID"]!, + "Hello World!", + ); + expect(msg.text, "Hello World!"); + }); + }); +}