AOSSIE-Org / AOSSIE-Org/Ell-ena

Implement Unit Tests for `MeetingFormatter` Service Layer

オープン
#294 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Dart
スター
54
フォーク
110
PR マージ指標
30日以内にマージされた PR はありません

説明

Currently, the `MeetingFormatter` class (`lib/services/meeting_formatter.dart`) lacks unit test coverage. This class contains critical string formatting and data parsing logic that ensures meeting summaries, key discussion points, and action items are correctly formatted and displayed in the chat interface. Since it relies heavily on raw Maps and string concatenation, any future changes or regressions here could break the chat UI presentation.

### Proposed solution
Add comprehensive unit tests for the `MeetingFormatter` class by creating a new test file at `test/services/meeting_formatter_test.dart`.

The test suite should use `flutter_test` and cover the following scenarios:
1. **`formatMeetingSummary`**: Ensure it correctly handles empty data, partial data (e.g., missing action items or decisions), and complete data structures.
2. **`formatMeetingSummaries`**: Verify that lists of meetings are separated correctly and that dates are properly parsed and formatted from `DateTime` strings.
3. **Edge cases**: Verify graceful handling of malformed inputs, null values in the maps, and empty lists.

### Additional Context
- This is a pure Dart utility class, meaning no heavy Widget testing, UI mocking, or Supabase mocking is required.
- The `flutter_test` dependency is already present in `pubspec.yaml`, so the project is ready for this addition.
- Adding this will significantly improve the overall code reliability and prevent future UI regressions during formatting. I would be happy to work on this and submit a PR!

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。