Skip to content

Conversation

@westover
Copy link
Contributor

  • Set up Jest testing framework for TypeScript with mocked native modules
  • Add unit tests for NMS (Non-Maximum Suppression) algorithm
  • Add unit tests for YOLO v8 output parser
  • Add Android unit tests (Kotlin/JUnit) for NMS and YOLO parser
  • Add iOS unit tests (Swift/XCTest) for NMS and YOLO parser
  • Create FEATURE_PARITY.md documenting iOS vs Android feature differences
  • Update package.json with test scripts and dependencies
  • Update android/build.gradle with test configuration

Test coverage includes:

  • IoU calculation edge cases
  • NMS suppression behavior
  • YOLO coordinate transformation
  • Platform-specific Y-axis handling (iOS CGContext flip)
  • Real-world NSFW detection scenarios

Feature parity gaps documented:

  • Scene classification (iOS only - VNClassifyImageRequest)
  • Rectangle detection (iOS only - VNDetectRectanglesRequest)
  • Sensitive Content Analysis (iOS 17+ only - no Android equivalent)
  • Live Activity (iOS full, Android stub)

- Set up Jest testing framework for TypeScript with mocked native modules
- Add unit tests for NMS (Non-Maximum Suppression) algorithm
- Add unit tests for YOLO v8 output parser
- Add Android unit tests (Kotlin/JUnit) for NMS and YOLO parser
- Add iOS unit tests (Swift/XCTest) for NMS and YOLO parser
- Create FEATURE_PARITY.md documenting iOS vs Android feature differences
- Update package.json with test scripts and dependencies
- Update android/build.gradle with test configuration

Test coverage includes:
- IoU calculation edge cases
- NMS suppression behavior
- YOLO coordinate transformation
- Platform-specific Y-axis handling (iOS CGContext flip)
- Real-world NSFW detection scenarios

Feature parity gaps documented:
- Scene classification (iOS only - VNClassifyImageRequest)
- Rectangle detection (iOS only - VNDetectRectanglesRequest)
- Sensitive Content Analysis (iOS 17+ only - no Android equivalent)
- Live Activity (iOS full, Android stub)
- TypeScript/Jest tests on every push/PR
- Android unit tests with Gradle
- iOS tests commented out (ready for macOS runner)

Runs on self-hosted Linux runners. Uncomment iOS job
when MacBook Air is configured as a runner.
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.

3 participants