IMPROVE - Add test coverage for OdometerViewModel#380
IMPROVE - Add test coverage for OdometerViewModel#380lauriecai wants to merge 20 commits intomikaelacaron:devfrom
Conversation
…r odometer readings
|
Thank you for contributing! The point of the issue is because it's more of the idea of "what are you planning to do" it generally doesn't have the exact specifics of how to complete that issue The PR is more about describing what exactly you did and why. (Because it's closer related to the git history and will have details that may be helpful if there's a bug found in the future related to this PR) So how you wrote them is fine! I'm about to review the PR itself, so I may make more notes, but generally for this project you should be using the Firebase emulator. Is there anything in the CONTRIBUTING instructions that I can add that makes it easier to understand what it's for and why you should be using it when contributing to this project? |
|
Thanks for the explanation - I'll do some more investigation on Firebase emulator and how to write better tests around that (instructions were clear, I was just worried about biting off more than I could chew). Will come back with a proposed plan. If you do end up with some feedback before that, please share! |
mikaelacaron
left a comment
There was a problem hiding this comment.
Great work to start this! I've left several comments some about style, but some about how you implemented the unit tests.
If you have any questions, you can comment directly on that thread, otherwise click the resolve button once you've addressed my comment. Once you fix everything, please click the re-review button
Basic-Car-Maintenance/Shared/Odometer/ViewModels/OdometerViewModel.swift
Outdated
Show resolved
Hide resolved
Basic-Car-Maintenance-Tests/Shared/Odometer/MockFirebaseService.swift
Outdated
Show resolved
Hide resolved
Basic-Car-Maintenance-Tests/Shared/Odometer/MockFirebaseService.swift
Outdated
Show resolved
Hide resolved
Basic-Car-Maintenance-Tests/Shared/Odometer/OdometerViewModelTests.swift
Outdated
Show resolved
Hide resolved
Basic-Car-Maintenance-Tests/Shared/Odometer/OdometerViewModelTests.swift
Outdated
Show resolved
Hide resolved
Basic-Car-Maintenance-Tests/Shared/Odometer/OdometerViewModelTests.swift
Outdated
Show resolved
Hide resolved
|
Hey @lauriecai ! I appreciate all the work you did on this PR forever ago! Hope you're doing well. I'm updating it to get it merged (just so you know, if you see any notifications about it) |
What it Does
Resolves #379 by validating CRUD operations for
OdometerViewModelHow I Tested
useEmulatortotruewithinOdometerViewModelTestsinitfunctionuserUID,viewModel, andnewReadingnewReading, then checking database fornewReadingNotes