Skip to content

refactor: simplify scanAllModelCandidates mock parameters in tests#12715

Open
kashish00208 wants to merge 1 commit into
Comfy-Org:mainfrom
kashish00208:refactor/missing-model-test-mocks
Open

refactor: simplify scanAllModelCandidates mock parameters in tests#12715
kashish00208 wants to merge 1 commit into
Comfy-Org:mainfrom
kashish00208:refactor/missing-model-test-mocks

Conversation

@kashish00208

Copy link
Copy Markdown

Summary

Reduce duplicated mock function signatures in missingModelPipeline.test.ts by using Parameters<typeof ...> forwarding where type-compatible. This keeps mock wrappers aligned with upstream function signatures and reduces maintenance overhead when APIs change.

Review Focus

I tried applying the pattern to all three mocks. scanAllModelCandidates works, but enrichWithEmbeddedMetadata and verifyAssetSupportedCandidates expose existing type mismatches between the mock signatures and the exported function signatures, resulting in type errors.

Fixes : #11793

@kashish00208 kashish00208 requested a review from a team June 8, 2026 18:22
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

🎨 Storybook: loading Building...

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

🎭 Playwright: ⏳ Running...

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.

refactor(test): reduce vi.mock() factory signature drift with Parameters<typeof ...>

1 participant