fix(tests): stub listTasks in the PROJECT_DELETE handler test - #857
Merged
Conversation
#854 made deleteProject enumerate the project's tasks so each cascaded task gets its own tombstone. The IPC handler test never stubbed `listTasks`, so the command iterated `undefined`, threw, and returned `success: false` — main's "Unit & integration tests" job has been red since that merge. Stub it, and add a second case that pins the enumeration contract: completed and archived tasks cascade too, so they must be included in the listing.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
h4yfans
marked this pull request as ready for review
July 22, 2026 17:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Main's Unit & integration tests job has been red since #854 merged. One failure:
Cause
#854 (issue #837) made
deleteProjectenumerate the project's tasks so each cascaded task gets its own tombstone:tasks-handlers.test.tsdeclareslistTasks: vi.fn()but the PROJECT_DELETE case never stubbed a return value, so the command iteratedundefined, threw, and the handler returned{ success: false }.Confirmed by checking out
f6a7b1234(the #854 merge itself, before anything else landed) and running the file — it fails there. Not a flake: it failed twice on CI, including a clean re-run.Fix
Stub
listTasksin that test, plus a second case pinning the enumeration contract — completed and archived tasks cascade too, so they must be in the listing. The domain-level cascade behaviour itself stays covered bypackages/domain-tasks/src/commands-delete-project.test.tsfrom #854.Verification
src/main/ipcproject suite: 501 passed (was 500 passed / 1 failed)ipc:check(pre-commit): clean🤖 Generated with Claude Code