Clean up test suite: remove obsolete code and fix inaccurate tests#355
Merged
hossain-khan merged 3 commits intomainfrom Nov 19, 2025
Merged
Clean up test suite: remove obsolete code and fix inaccurate tests#355hossain-khan merged 3 commits intomainfrom
hossain-khan merged 3 commits intomainfrom
Conversation
- Remove commented-out Firebase initialization code from ObserveDeviceHealthWorkerTest - Update @ignore annotations with clear explanations of why tests are disabled - Remove unused test variables (testDispatcher, testScope) from DataStore tests - Remove unused imports - Fix inaccurate test name and comments in EmailQuotaManagerTest Co-authored-by: hossain-khan <99822+hossain-khan@users.noreply.github.com>
The ExampleUnitTest.kt is a template file with no real test value. Co-authored-by: hossain-khan <99822+hossain-khan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Check test correctness and reduce duplication
Clean up test suite: remove obsolete code and fix inaccurate tests
Nov 19, 2025
hossain-khan
approved these changes
Nov 19, 2025
Code Coverage Report |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review found tests with commented code, unused variables, and misleading names/comments.
Changes
Removed obsolete code (23 lines)
ObserveDeviceHealthWorkerTesttestDispatcherandtestScopevariables fromAppPreferencesDataStoreTestandEmailQuotaManagerTestExampleUnitTest.ktFixed test accuracy
quota resets on new day→getRemainingQuota returns 0 when quota is exhaustedinEmailQuotaManagerTestImproved documentation
@Ignoreannotations with specific reasons: "Test has incomplete mock setup - repository.insertAlertCheckLog needs proper mocking"Example
Before:
After:
Result: 135 tests (133 passing, 2 properly ignored), -57 lines of unused code
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.