AOSSIE-Org / AOSSIE-Org/Ell-ena
Implement Unit Tests for `MeetingFormatter` Service Layer
- Dominant language
- Dart
- Stars
- 54
- Forks
- 110
- PR merge metrics
- No merged PRs in 30d
Description
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!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.