Skip to content

Add unit tests for WardrobeViewModel and WardrobeRepositoryImpl#4

Merged
jvsena42 merged 1 commit intomainfrom
chore/tests
Mar 22, 2026
Merged

Add unit tests for WardrobeViewModel and WardrobeRepositoryImpl#4
jvsena42 merged 1 commit intomainfrom
chore/tests

Conversation

@jvsena42
Copy link
Copy Markdown
Owner

Summary

Add comprehensive unit tests for the app's core business logic (WardrobeRepositoryImpl) and MVI ViewModel (WardrobeViewModel). This establishes the test infrastructure with Turbine for Flow testing and MockK for mocking concrete dependencies.

Changes

  • Add Turbine 1.2.1 and MockK 1.14.9 test dependencies
  • Enable withHostTestBuilder on the Android KMP target for JVM-based tests
  • Add 14 WardrobeViewModel tests in commonTest covering all MVI intents, state transitions, and side effects
  • Add 12 WardrobeRepositoryImpl tests in androidHostTest using MockK to mock DB, file storage, and AI client
  • Create reusable test fakes: FakeWardrobeRepository, FakeSecretStore, and TestData factory

Test plan

  • Run ./gradlew :shared:allTests — all 26 tests pass
  • Run ./gradlew detekt — no violations

Checklist

  • ./gradlew detekt passes
  • Tested on Android
  • Tested on iOS
  • Updated documentation (if applicable)

🤖 Generated with Claude Code

@jvsena42 jvsena42 enabled auto-merge March 22, 2026 22:08
@jvsena42 jvsena42 self-assigned this Mar 22, 2026
@jvsena42 jvsena42 merged commit 8225a9b into main Mar 22, 2026
1 check passed
@jvsena42 jvsena42 deleted the chore/tests branch March 22, 2026 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant