Skip to content

Add ListForm and WidgetDbHelper tests#18

Merged
pgarr merged 2 commits into
masterfrom
add-widget-and-listform-tests
May 25, 2026
Merged

Add ListForm and WidgetDbHelper tests#18
pgarr merged 2 commits into
masterfrom
add-widget-and-listform-tests

Conversation

@pgarr
Copy link
Copy Markdown
Owner

@pgarr pgarr commented May 25, 2026

Summary

  • components/__tests__/ListForm.test.tsx (4 tests): save with trimmed title, empty-title guard, Add appends a row, Delete removes the correct item
  • android/…/WidgetDbHelperTest.kt (10 tests): parseItems — invalid JSON, empty array, wrong root type, field defaults, originalIndex correctness, null-entry skipping, full round-trip
  • android/app/build.gradle: add junit:4.13.2 and org.json:json:20231013 test dependencies (the org.json jar is needed because Android stubs optJSONObject as a no-op in JVM unit tests)

Test plan

  • npm run test-ci passes (27 JS tests)
  • cd android && ./gradlew :app:testDebugUnitTest passes (10 Kotlin tests)

🤖 Generated with Claude Code

pgarr and others added 2 commits May 25, 2026 18:44
- components/__tests__/ListForm.test.tsx: 4 tests covering save, empty
  title guard, add item, and delete item
- android/…/WidgetDbHelperTest.kt: 10 tests covering parseItems (invalid
  JSON, empty array, field defaults, originalIndex, null skipping,
  round-trip)
- android/app/build.gradle: add JUnit 4 and org.json test dependencies
  (org.json needed because Android stubs no-op the real implementation
  in JVM unit tests)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@pgarr pgarr merged commit 1b87265 into master May 25, 2026
2 checks passed
@pgarr pgarr deleted the add-widget-and-listform-tests branch May 25, 2026 16:49
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