You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The local WorkflowInstance.delete() and Workflow.deleteBatch() support added in #15123 has no test coverage. Confirmed: packages/workflows-shared/tests/ contains no reference to delete, and no test file in the repo references deleteBatch.
There is an existing suite at packages/workflows-shared/tests/binding.test.ts covering create, get, createBatch and WorkflowHandle, so there is a clear home for these.
Worth covering
Deleting a running instance, and that it is actually gone afterwards.
Deleting an instance ID that does not exist.
The batch guard rails: the empty-batch and >100-instance errors (binding.ts:246-256).
delete() and deleteBatch() are covered in packages/workflows-shared/tests/binding.test.ts, including at least one case that asserts a failure is reported rather than being reported as a success.
Split out of #15123 so that PR can land. Raised by Devin: #15123 (comment)
Problem
The local
WorkflowInstance.delete()andWorkflow.deleteBatch()support added in #15123 has no test coverage. Confirmed:packages/workflows-shared/tests/contains no reference todelete, and no test file in the repo referencesdeleteBatch.Untested code paths:
packages/workflows-shared/src/binding.ts:243—WorkflowBinding.deleteBatch()packages/workflows-shared/src/binding.ts:522—WorkflowHandle.delete()packages/miniflare/src/workers/workflows/wrapped-binding.worker.ts:37—deleteBatch()wrapperpackages/miniflare/src/workers/workflows/wrapped-binding.worker.ts:137—delete()wrapperThere is an existing suite at
packages/workflows-shared/tests/binding.test.tscoveringcreate,get,createBatchandWorkflowHandle, so there is a clear home for these.Worth covering
binding.ts:246-256).deleted/errorssplit — note this is currently broken (see [workflows] LocaldeleteBatch()always reports success, so failures are invisible #15138), so these tests should be written against the intended semantics decided there, and will likely land with that fix.Acceptance
delete()anddeleteBatch()are covered inpackages/workflows-shared/tests/binding.test.ts, including at least one case that asserts a failure is reported rather than being reported as a success.