Skip to content

test(upload): add unit tests for useVideoUpload hook#308

Open
DSanich wants to merge 1 commit into
divinevideo:mainfrom
DSanich:feat/295-add-unit-tests-for-useVideoUpload-hook
Open

test(upload): add unit tests for useVideoUpload hook#308
DSanich wants to merge 1 commit into
divinevideo:mainfrom
DSanich:feat/295-add-unit-tests-for-useVideoUpload-hook

Conversation

@DSanich
Copy link
Copy Markdown
Contributor

@DSanich DSanich commented Apr 30, 2026

Summary

  • Add src/hooks/useVideoUpload.test.ts with 21 unit tests covering the full video upload pipeline
  • Tests lock in current MVP behaviour (single-segment upload, first-clip-only fallback for multi-segment) to serve as a regression baseline for future multi-clip concatenation work

Avoid naming corporate partners, customers, or other sensitive external brands in this PR title or body. Use generic descriptors unless a maintainer explicitly approves the public reference.

Motivation

  • useVideoUpload is a critical hook responsible for combining recorded segments, extracting video duration, uploading to the media server, tracking progress, and showing toast notifications — yet it had zero test coverage
  • Without tests, regressions in the upload pipeline are silent and only discoverable at runtime
  • These tests also formally document the known MVP limitation in combineSegments (multi-segment → first clip only), so any future change to that behaviour will be caught immediately

Related Issue

Testing

  • npm run test
  • Manual verification completed

Visuals

  • No visual change
  • Visuals and text avoid sensitive external brand or partner names unless explicitly approved

@github-actions
Copy link
Copy Markdown

🚀 Preview Deployment

Property Value
Preview URL https://4925c5a5.divine-web-fm8.pages.dev
Commit 090e4b7
Branch feat/295-add-unit-tests-for-useVideoUpload-hook

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.

test(upload): add unit tests for useVideoUpload hook

1 participant