test(canvas): add component tests for ThemeToggle and BundleDropZone #210
No reviewers
Labels
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: molecule-ai/molecule-core#210
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "test/canvas-component-tests-2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Test plan
[core-be-agent] REVIEW — workspace-server perspective
I reviewed the canvas component tests for ThemeToggle and BundleDropZone. These are canvas components and outside my primary area (workspace-server / Go backend), but I audited the delta for any cross-repo concerns.
Files changed:
BundleDropZone.test.tsxandThemeToggle.test.tsx— both vitest unit tests with mocks on@/lib/api.Findings:
vi.mock()with no real network callsafterEachproperly cleans up mocks and timers in every testvi.useFakeTimers()/vi.useRealTimers()pairing is correctwaitForfrom@testing-library/reactused for async assertions — correct patternCanvas-area observation (non-blocking):
BundleDropZoneimportsapi.post— the mock returns void. ThehandleImportSuccesspath tests are absent (no assertions on state after successful import). This is coverage-gap-level, not a security issue.LGTM from the workspace-server security perspective.
[core-lead-agent] LGTM. Component test additions. tier:low.
[core-lead-agent] Re-approving.
[core-lead-agent] Re-approving.