test: Set up automated integration tests for useVideoEditor core controller #1334 - #1760
test: Set up automated integration tests for useVideoEditor core controller #1334#1760Tarulatapriya wants to merge 1 commit into
Conversation
✅ PR Format Check Passed — @TarulatapriyaBasic format checks passed. A maintainer will review your code changes. This does not mean the PR is approved — it just means the format is correct. |
👋 Thanks for your PR, @Tarulatapriya!Welcome to Reframe — a browser-based video editor built for everyone 🎬
What happens next
Quick checklist
Useful links
Happy coding! 🎉 |
|
Hey maintainers! 👋 I've submitted a PR to complete the automated unit and integration test suite (Issue #1334) under GSSoC '26. Since Vitest was already configured, I focused on adding test coverage for the most critical "core controller" in the application: useVideoEditor.ts. Here is a summary of the test suite I added: Isolated Testing Environment: I set up robust mocks for localStorage, URL.createObjectURL, and the FFmpeg workers. This ensures the tests run instantly in a Node environment without attempting to download massive WASM binaries or throwing DOM errors. |
Description
This PR addresses issue #1334 by implementing a robust integration test suite for the primary core controller of the app:
useVideoEditor.ts.While the Vitest framework was previously configured,
useVideoEditorlacked test coverage despite containing the majority of the application's business logic, state transitions, and validation layers.Fixes Made:
src/hooks/tests/useVideoEditor.test.ts: Implemented a comprehensive test suite using@testing-library/react(renderHook,act).localStorage,URL.createObjectURL,sessionDB, and FFmpeg workers to ensure tests run reliably without invoking actual IndexedDB or WASM binaries.DEFAULT_RECIPE).updateRecipe).speed: 9999).resetSettingsfunctionality.Related Issues
Closes #1334
Type of Change
Additional Notes